Forum Discussion

kylerwimbush's avatar
kylerwimbush
Icon for Helper I rankHelper I
3 years ago
Solved

Get Minimum Average for a Season

I have a column in my calendar table that returns the season of the date. I have scores associated with those dates as well. I would like to create a measure that returns the season and average, for the season that has the lowest average score. 

'Calendar Table' [Season]
Safety[Score] 

 

If anyone has any ideas that would be great, thanks. 

  • kylerwimbush Maybe:

    Lowest Season = 
      VAR __Table = SUMMARIZE('Calendar Table',[Season],"__Score",AVERAGE('Safety'[Score]))
      VAR __Lowest = MINX(__Table,[__Score])
      VAR __Result = MINX(FILTER(__Table,[__Score] = __Lowest),[Season])
    RETURN
      __Result

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    kylerwimbush Maybe:

    Lowest Season = 
      VAR __Table = SUMMARIZE('Calendar Table',[Season],"__Score",AVERAGE('Safety'[Score]))
      VAR __Lowest = MINX(__Table,[__Score])
      VAR __Result = MINX(FILTER(__Table,[__Score] = __Lowest),[Season])
    RETURN
      __Result