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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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