Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Category Averages and Relative Tag

Hi all,

 

Could anyone help with the recommended formula for these measures? Am looking to include either in a card or table visualisation;

 

Account NameCountry  Grand Total Grand Total Average Per CountryBelow/Above Average Per Country
BobUnited States23000Average of all those where Country = United States"Below Country Average"
WendyUnited States4457865Average of all those where Country = United States"Above Country Average"
MaryCanada4468477Average of all those where Country = Canada"Above Country Average"
SinclairUnited Kingdom280492Average of all those where Country = United Kingdom "Country Average"
OberonBrazil22336  
HarryUnited States746736EtcEtc
ShellyUnited States27915  
DionneCanada38400  
BrettUnited States12000  
KobeUnited Kingdom27901  
MichaelCanada70000  
GraceUnited States3296237  
KellyBrazil71662  

 

Thanks so much in advance!

 

  • Hi Anonymous ,

     

    You could refer to the following measures:

    Grand Total Average Per Country =
    CALCULATE (
        AVERAGE ( 'Table'[Grand Total ] ),
        ALLEXCEPT ( 'Table', 'Table'[Country ] )
    )
    
    Below/Above Average Per Country =
    IF (
        SELECTEDVALUE ( 'Table'[Grand Total ] ) < [Grand Total Average Per Country],
        "below",
        "above"
    )

    Here is my test result:

     

2 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You could refer to the following measures:

    Grand Total Average Per Country =
    CALCULATE (
        AVERAGE ( 'Table'[Grand Total ] ),
        ALLEXCEPT ( 'Table', 'Table'[Country ] )
    )
    
    Below/Above Average Per Country =
    IF (
        SELECTEDVALUE ( 'Table'[Grand Total ] ) < [Grand Total Average Per Country],
        "below",
        "above"
    )

    Here is my test result:

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks! Perfect - very much appreciated!