由 2 个表计算出的表并求和 DAX

问题描述 投票:0回答:1

我正在尝试从通过桥连接的 2 个表创建一个计算表。

我的3张桌子

Report      ReportRow   Account Sign UniqueKey
Rapport129  129/* CM    35100   1    4177960
Rapport129  129/* CM    35100   -1   4174475
Rapport129  129/* CM    34000   1    4176966
Rapport129  129/* CM    93220   -1   4179774

UniqueKey Konto
4179774   93220
4177960   35100
4176966   34000
4174475   35100


FactKey Account Amount Date
1       35100   10     20240101
2       35100   20     20240101
3       34000   100    20240101
4       34000   200    20240101
5       93220   -500   20240101
6       93220   300    20240101

型号(含日期表) enter image description here

这就是我想要的计算表的样子:

![enter image description here

powerbi dax data-analysis powerbi-desktop calculated-columns
1个回答
0
投票

这符合你的要求吗?

Table = 
ADDCOLUMNS(
    SUMMARIZE(DimReport, DimReport[Report], DimReport[ReportRow], DimReport[Account]),
    "Month", MONTH(CALCULATE(MAX('Fact'[Date]))),
    "Sum Sign", CALCULATE( SUM(DimReport[Sign])),
    "Sum Amount", CALCULATE(SUM('Fact'[Amount]))
)
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.