Forum Discussion

rendalignacio's avatar
8 years ago
Solved

Incorrect matrix row total

Hi,

 

Can you please help me with this scenario?

 

The matrix row gives an incorrect average. Please see image:

 

  • rendalignacio,

     

    You may use the following measure.

    Measure =
    IF (
        HASONEFILTER ( Table1[Test] ),
        AVERAGE ( Table1[Value] ),
        AVERAGEX (
            ALLSELECTED ( Table1[Test] ),
            CALCULATE ( AVERAGE ( Table1[Value] ) )
        )
    )
    

2 Replies

  •  

    hi rendalignacio,

     

    Why are you saying that is wrong? Careful with average of averages as they are not the same of total average.

     

    Does this make sense?

     

     

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Community Support

    rendalignacio,

     

    You may use the following measure.

    Measure =
    IF (
        HASONEFILTER ( Table1[Test] ),
        AVERAGE ( Table1[Value] ),
        AVERAGEX (
            ALLSELECTED ( Table1[Test] ),
            CALCULATE ( AVERAGE ( Table1[Value] ) )
        )
    )