Forum Discussion

MuthalibAbdul's avatar
MuthalibAbdul
Helper II
1 year ago
Solved

Average for each small multiple

  I am trying to have individual monthly average for each location. x axis is Calender[Month] Y axis is FinalTable[Patient Name] Small multiples is FinalTable[Location] I cannot use sum si...
  • danextian's avatar
    1 year ago

    Hi MuthalibAbdul 

    It seems that you're using the average from "Add further analyses to your visual" which unforunately returns the average for all. If you want the average for each small multiple by month, create a measure

    Monthly Average = 
    AVERAGEX ( ALLSELECTED ( 'Date'[Month] ), [Row Count] )
    
    Monthly Average Label = 
    VAR _maxMonth =
        MAXX ( ALLSELECTED ( 'Date'[Month] ), [Month] )
    RETURN
        IF ( SELECTEDVALUE ( 'Date'[Month] ) = _maxMonth, [Monthly Average] )
    

    You'll need to use a custom data label to be able to show the label only for  a specific data point.

     

    Please see the attached pbix