Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
menglaro78
Microsoft Employee
Microsoft Employee

TOP N RANK EXCLUSIVE

Hi All,

i have this situation,

For each team I would like to score the top 3 players.

 

MEXICO TEAM ISSUE:

 

In this case 2 players have same results Ancer -1 and Morikawa -1, sono for top n filter both are considered.

I would like a measure that considers only 1.

 

Correct result for Mexico total would like -8

 

This is the measure that i use in a table.

 

FilterTop3ByCat_Filter =
VAR Top3Cat =
CALCULATETABLE (
GENERATE (
VALUES ( TEAMS[Team] ),
TOPN (
3,
CALCULATETABLE ( VALUES ( TEAMS[Player]) ),
[Par]*-1, DESC
)
),
ALLSELECTED()
)
RETURN
CALCULATE (
1 * ( NOT ISEMPTY ( TEAMS ) ),
KEEPFILTERS ( Top3Cat )
)

Any Ideas ?

 

golf.PNG

 

Thank U 

Marco

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@menglaro78 , Use break tie for Rank. see if can help

https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@menglaro78 , Use break tie for Rank. see if can help

https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Many thanks,

good Idea, I solved, using as measure in topn calculated, points + rand ().

 

Marco

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.