Forum Discussion
Anonymous
8 years agoNot applicable
Context on Measure (with SUMMARIZE) - Same Table
Hi guys. I am using a SUMMARIZE to do some calculations on Table1 with 2 levels of granularity: - ID1 for client (DimTable1) - ID2 for product (DimTable2) Now I am doing a calculation...
v-yuta-msft
Community Support
8 years agoHi svalen ,
'Table1' has relationship with 'DimTable', right? So which relationship have you built, one-to-many or many-to-one? In DAX, you should use one-side to filter many-side, inversely, there will be error.
Regards,
Jimmy Tao
- Anonymous8 years agoNot applicable
Hi v-yuta-msft, thanks for replying.
Yes, Table1 has relations with both Dim Tables, one to many. The code was a bit off, here it is corrected (what doesn't work is bold):
RAPSI REAL = CALCULATE ( SUM ( 'Table1'[RAPSI] ); FILTER ( SUMMARIZE ( ALL ( 'Table1'[Client_ID]; 'Table1'[MonthYear] ); 'Table1'[Client_ID]; 'Table1'[MonthYear]; "MEASURESIVALUEPFPRODUCT"; SUM ( 'Table1'[SI VALUE PF] ); "MEASURESIVALUEPFCLIENT"; CALCULATE(SUM('Table1'[SI VALUE PF]);ALL(DimTable1[Product_ID]))); [MEASURESIVALUEPFCLIENT] >= 200