Forum Discussion
How to get average gap through filter
- 4 years ago
Hi ade_kurniawan ,
You need make a little bit change to your Gap score Measure.
Gap score = VAR selectedYear = MAX ( Sheet1[Year] ) VAR CurrentScore = CALCULATE ( [avg score], FILTER ( ALL ( Sheet1 ), Sheet1[Year] = selectedYear ) ) VAR LastScore = CALCULATE ( [avg score], FILTER ( ALL ( Sheet1 ), Sheet1[Year] = MAX ( Sheet1[Year] ) - 1 ) ) RETURN CurrentScore - LastScoreThen, the result should look like this.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi ade_kurniawan ,
You need make a little bit change to your Gap score Measure.
Gap score =
VAR selectedYear =
MAX ( Sheet1[Year] )
VAR CurrentScore =
CALCULATE (
[avg score],
FILTER ( ALL ( Sheet1 ), Sheet1[Year] = selectedYear )
)
VAR LastScore =
CALCULATE (
[avg score],
FILTER ( ALL ( Sheet1 ), Sheet1[Year] = MAX ( Sheet1[Year] ) - 1 )
)
RETURN
CurrentScore - LastScore
Then, the result should look like this.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
thank you so much