Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Comparing a category with the next ranked category

Aim: To compare results of a player in one age group to the next age group up.  Essentially, say I select player 001, I want to find out what the difference is between their score and the average o...
  • tamerj1's avatar
    4 years ago

    Anonymous 

    Please try

    Score Difference =
    VAR CurrentTeam =
        SELECTEDVALUE ( Table[Team ID] )
    VAR CurrencyScore =
        SELECTEDVALUE ( Table[YOYO Score] )
    VAR NextGroupAverage =
        CALCULATE (
            AVERAGE ( Table[YOYO Score] ),
            ALLEXCEPT ( Table, Table[Session Date] ),
            Table[Team ID] = CurrentTeam + 1
        )
    RETURN
        CurrencyScore - NextGroupAverage