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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
MSirfan
Frequent Visitor

How can I get the top 10 performers (only 10 rows) from a table only by using DAX for duplicate rows

Employee Nameratings
A5
B5
C5
D5
E5
F5
G5
H4
I4
J5
K5
L4
M5

The Output should be

Employee Nameratings
A5
B5
C5
D5
E5
F5
G5
J5
K5
M5
2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Has to be a calculated table, not a measure.

View solution in original post

talespin
Solution Sage
Solution Sage

hi @MSirfan 

 

Assumption : Employee will not be repeated, need to pass unique ID.

 

Rank Emp =
RANK(DENSE, ALL(Table3), ORDERBY(Table3[Nameratings], DESC, Table3[Employee], ASC))
 
talespin_0-1710000296798.png

 

View solution in original post

6 REPLIES 6
talespin
Solution Sage
Solution Sage

hi @MSirfan 

 

Assumption : Employee will not be repeated, need to pass unique ID.

 

Rank Emp =
RANK(DENSE, ALL(Table3), ORDERBY(Table3[Nameratings], DESC, Table3[Employee], ASC))
 
talespin_0-1710000296798.png

 

lbendlin
Super User
Super User

Has to be a calculated table, not a measure.

lbendlin
Super User
Super User

TOPN(10, Table, NameRatings, DESC)

 

Note this will not be deterministic even if you specify how to handle ties.

We can't pass a column without using aggregation function in Topn function because it's takes only a single scalar value

I'm not following. 

 

lbendlin_0-1709957242534.png

 

MSirfan_0-1709958171084.png

i am getting this error 

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.