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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
koorosh
Post Partisan
Post Partisan

Topn Participants

Hello all experts,

The excel data sheet (attached) shows participant names in an exam list. How I can find "topn" participants? It means, for instance, two participants who have been in more exams.

Thanks in advance.

Koorosh

ExamName
MicrosoftAL
MicrosoftAC 
saleAC 
saleadh
Microsoftadu
Microsoftae
saleag
Microsoftaj
installingal
Microsoftalex
MicrosoftAlexan
MicrosoftAlexander
saleAlexander
installingalexy
Microsoftalexy
Microsoftaloy
salealoy
installingandre
installing2andre
installing3andre
marketandre
Microsoftandre
Onlineandre
saleandre
Techandre
BusimessAdvancedandre
installing3Andy
MicrosoftAndy
saleAndy
installing2anna
Microsoftanna
Onlineanna
Microsoftannie
Microsoftantt
installingavl
installing3avl
Microsoftavl
Microsoftaz
installingBay
installing3Bay
MicrosoftBay
Microsoftben
saleben
Microsoftbenh
Microsoftbeng
salebeng
installing3Bern
extendCham
MicrosoftCham
Microsoftcj
Microsoftclad
installingcob
installing3cob
Microsoftcob
Onlinecob
Techcob
BusimessAdvancedcob
Microsoftcsch
installingdann
Microsoftdann
Microsoftdar
MicrosoftDeb
Microsoftdec
installingDen
MicrosoftDen
installingdhi
installing3dhi
Microsoftdhi
Microsoftdon
1 ACCEPTED SOLUTION

Hi @koorosh ,

 

Just create the following measure:

 

 

Rank = RANKX(ALL('Table'[Name]),CALCULATE(DISTINCTCOUNT('Table'[Exam])),,,Dense)

 

 

Then change filter of table visual:

 

Capture1.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@koorosh ,For Rank Refer these links

https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
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

example

exam cnt =calculate(count(Table[Exam]))

Rank = RANKX(all(Table[Name]),[exam cnt])

filter rank or

 

Top 10 Rank = CALCULATE([exam cnt],TOPN(10,all(Table[Name]),[exam cnt],DESC),VALUES(Table[Name]))

Top 10 Rank = CALCULATE(count(Table[Name]),TOPN(10,all(Table[Name]),[exam cnt],DESC),VALUES(Table[Name]))

 

Don't you think we should use DistinctCount instead of Count function?

Hi @koorosh ,

 

Just create the following measure:

 

 

Rank = RANKX(ALL('Table'[Name]),CALCULATE(DISTINCTCOUNT('Table'[Exam])),,,Dense)

 

 

Then change filter of table visual:

 

Capture1.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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