如何在SSRS / Powerbi中划分同一列的两行?

时间:2018-07-11 17:01:22

标签: sql reporting-services ssrs-2008 powerbi

{"Messages":[
    {"Errors":[
        {
            "ErrorIdentifier":"3ae7f07f-64df-4d6c-ae2e-e14b3d433a72",
            "ErrorCode":"send-0008",
            "StatusCode":403,
            "ErrorMessage":"myemail@companyName.com" is not an authorized sender email address for your account.",
            "ErrorRelatedTo":["From"]}
    ],"Status":"error"}
]

我有一个像这样的表,我需要一个新行,该行使我得到ytd中的余额除以利息所得的结果。

预期投入:

Account Name          Balance
YTD                   10000
Interest              100
Depreciation          500
Less Distributions    -7000
Plus Paid in Capital  600
Principal             2600

1 个答案:

答案 0 :(得分:0)

=SUM(IIF(Fields!AccountName.Value = "YTD", Fields!Balance.Value, Nothing)) / SUM(IIF(Fields!AccountName.Value = "Interest", Fields!Balance.Value, Nothing))