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
Anonymous
Not applicable

RANKX tie break

Hi,

 

trying to get 10 Most/least booked spaces, from a building desk booking table. I tried to do ranking and select top/bottom 10 from the list, but the ranking logic does not work properly, when it has the same duration total (when it's a tie). 

 

 Capture.PNG

For Top10, expecting it to return only the top 5 results (the ranking should be sequential and unique).

 

measures,

TableTopRank = RANKX (ALL(BookingAppointments),[TableTotalDuration],,DESC,Dense)
TableTotalDuration = SUM(BookingAppointments[Duration Minutes])
 

Any help or suggestions please?

 

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

1, First, add a grouping and sum column in Power Query (Equivalent to the measure [TableTotalDuration].)

2, Sort the column created in the first step.

3, Add an Index column.

v-lionel-msft_1-1616402850884.png

 

Best regards,
Lionel Chen

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

 

View solution in original post

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

1, First, add a grouping and sum column in Power Query (Equivalent to the measure [TableTotalDuration].)

2, Sort the column created in the first step.

3, Add an Index column.

v-lionel-msft_1-1616402850884.png

 

Best regards,
Lionel Chen

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

 

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!

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.