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
abehrmann
Helper II
Helper II

Need help ranking results for a Microsoft forum quiz

I am doing an improv test at a company meeting and the CEO wants to display the top score and the owner of the top score, 

 

i would like to rank first by score and if a tie then by shortest time to take the quiz 

 

Table Name

Table1

Column names  

total points 

name 

Time to take 

3 REPLIES 3
AlB
Super User
Super User

Hi @abehrmann

 

The following will yield a table with the top participant(s) (plural if there were more than one with same top score and time). I've named the table Results instead of Table1  

 

TOPN ( 1; Results; Results[Points]; DESC; Results[Time]; ASC )

 

If you want a measure that displays the name see below. Note that this measure will display the warning if there were more than one participant with same top score and time: 

Measure =
CALCULATE (
    SELECTEDVALUE ( Results[Name]; "More than one candidate" );
    TOPN ( 1; Results; Results[Points]; DESC; Results[Time]; ASC )
)

Can you explain to do do the top suggestion?

@abehrmann

 

Sure thing. What exactly do you  want me to explain?

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.

Top Solution Authors