Forum Discussion
Total Sum as per different matrix selection
- 5 years ago
Hi Anonymous ,
I did the following measure:
Total = IF ( ISFILTERED ( Table_1 ) || ISFILTERED ( Table_2 ) || ISFILTERED ( Table_3 ) || ISFILTERED ( Table_4 ); IF ( ISFILTERED ( Table_1[Week] ); SUM ( Table_1[Value] ); 0 ) + IF ( ISFILTERED ( Table_2[Week] ); SUM ( Table_2[Value] ); 0 ) + IF ( ISFILTERED ( Table_3[Week] ); SUM ( Table_3[Value] ); 0 ) + IF ( ISFILTERED ( Table_4[Week] ); SUM ( Table_4[Value] ); 0 ); SUM ( Table_1[Value] ) + SUM ( Table_2[Value] ) + SUM ( Table_3[Value] ) + SUM ( Table_4[Value] ) )asically I'm checking if there is any matrix that is filtered if yes I only pickup the filtered values if none is filter I sum all the values.
Check PBIX file attach:
All matrix values are coming from different four table .
Hi MFelix,
All matrix values are coming from different four table .
For testing, I created measure using isfiltered but it is not working for signle matrix and How can I put two isfiltered condition in this measure . If i want to select two phase I and 2 then it will display two phase sum.
Hi Anonymous ,
I did the following measure:
Total =
IF (
ISFILTERED ( Table_1 ) || ISFILTERED ( Table_2 )
|| ISFILTERED ( Table_3 )
|| ISFILTERED ( Table_4 );
IF ( ISFILTERED ( Table_1[Week] ); SUM ( Table_1[Value] ); 0 )
+ IF ( ISFILTERED ( Table_2[Week] ); SUM ( Table_2[Value] ); 0 )
+ IF ( ISFILTERED ( Table_3[Week] ); SUM ( Table_3[Value] ); 0 )
+ IF ( ISFILTERED ( Table_4[Week] ); SUM ( Table_4[Value] ); 0 );
SUM ( Table_1[Value] ) + SUM ( Table_2[Value] )
+ SUM ( Table_3[Value] )
+ SUM ( Table_4[Value] )
)
asically I'm checking if there is any matrix that is filtered if yes I only pickup the filtered values if none is filter I sum all the values.
Check PBIX file attach: