Power Pivot / Power BI处理Power Pivot / PowerBI中的挡片

时间:2018-09-13 10:53:16

标签: pivot

我有一张桌子,如下所示:

TABLE1

5670    Paid for A  1000    A   PK1
5670    Paid for B  200 B   PK2
5120    Paid for C  300     
5120    Paid for D  400     PK2
5120    Paid for E  500 E   PK2
5120    Paid for F  600 F   

TABLE2

T1CODE  Name
A   Group A
B   Group B
E   Group E
F   Group F

以上数据的输出:

Row Labels  Sum of Amount
(blank) 700
A   1000
B   200
E   500
F   600
Grand Total 3000

使用DAX的必需输出:

Row Labels  Sum of Amount
A           1000
B           200
E           500
F           600
Grand Total 3000

1 个答案:

答案 0 :(得分:0)

尝试一下:

Sum Of Values =
CALCULATE (
    SUM ( 'TABLE1'[Amount] ),
    FILTER ( 'TABLE1', 'TABLE1'[Row Labels] <> BLANK () )
)