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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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