Forum Discussion
Anonymous
4 years agoNot applicable
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...
- 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
tamerj1
Community Champion
4 years agoAnonymous
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- Anonymous4 years agoNot applicable
Thank you for your solution, I played around with it and split up the data into seperate tables and came out with the following which works:
Team Up =
Var AgeUp = SELECTEDVALUE(Joined[TeamCompOrder]) + 1
Var SelectedplayerScore = SELECTEDVALUE(Joined[Score])
Var SelectedPosition = SELECTEDVALUE(Joined[Position])
Var AvgPositionUp = CALCULATE(AVERAGE(Summary[Avg Score]),Summary[TeamCompOrder] = AgeUp && Summary[Position] = SelectedPosition)
RETURN
SelectedPlayerScore - AvgPositionUp