Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Total Sum as per different matrix selection

Total should be display (200+270=470) but it is not coming correct. if i select value from all for matrix (300+270+122+200 then it is display correct sum(like 892). if i select three matrix value the...
  • MFelix's avatar
    MFelix
    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: