Forum Discussion
Get Top 10 Employees based On Total Score
- 3 years ago
HI,
Thank you for your message, and please check the below screenshot and the attached pbix file.
I amended to have a measure in the formula.
Show top5 only V2: = CALCULATE ( [Score total:], KEEPFILTERS ( WINDOW ( 1, ABS, 5, ABS, ALL ( 'Name'[Full Name] ), ORDERBY ( [Score total:], DESC ) ) ) )
Hi,
I am not sure how your datamodel looks like, and how your expected outcome looks like, but I tried to create a sample pbix file like below.
Please check the below picure and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Show top5 only: =
CALCULATE (
SUM( Score_fact[Score]),
KEEPFILTERS (
WINDOW (
1,
ABS,
5,
ABS,
ALL ( 'Name'[Full Name] ),
ORDERBY ( CALCULATE( SUM( Score_fact[Score]) ), DESC )
)
)
)
The Score is stored as a measure called [Total Score] so is there a way you can work that around to work for a measure instead of a column?
- Jihwan_Kim3 years ago
Super User
HI,
Thank you for your message, and please check the below screenshot and the attached pbix file.
I amended to have a measure in the formula.
Show top5 only V2: = CALCULATE ( [Score total:], KEEPFILTERS ( WINDOW ( 1, ABS, 5, ABS, ALL ( 'Name'[Full Name] ), ORDERBY ( [Score total:], DESC ) ) ) )- kylerwimbush3 years ago
Helper I
That works, but it shows everyone elses names (not top 5) afterwards with a weird value. That doesn't matter if there is a way to limit the rows produced to 5. Is there a way that can happen?
- Jihwan_Kim3 years ago
Super User
Hi,
Thank you for your message, and please check the below picture and the attached pbix file.
I am not sure if I understood your question correctly, but try to deselect unnecessary measures from the visualization.