Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear all,
i am looking for the output of top 10 values based on the category(Subject), The problem is i am working on the real time dataset, which dosen't allow to use any calculated column.
the output has duplicate ranks, which leads to bring more than 10 values due to ties in the value.
The formula used
Solved! Go to Solution.
Hi @vijayan_ja ,
Please try this:
Rank = IF ( [FlagLatest] = 1, RANKX ( FILTER ( ALLSELECTED ( RealTimeTest ), [FlagLatest] = 1 && RealTimeTest[metric_name] = MAX ( RealTimeTest[metric_name] ) ), [SumwithContext], , DESC, DENSE ) )
Best regards,
Yuliana Gu
Hi @vijayan_ja ,
Please try this:
Rank = IF ( [FlagLatest] = 1, RANKX ( FILTER ( ALLSELECTED ( RealTimeTest ), [FlagLatest] = 1 && RealTimeTest[metric_name] = MAX ( RealTimeTest[metric_name] ) ), [SumwithContext], , DESC, DENSE ) )
Best regards,
Yuliana Gu
@vijayan_ja in this article there is a section which talks about breaking ties, scroll down the page on article and you need similar approach to make it work in your model.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Breaking ties using date column dosen't works, because the date value is same acrros the table. and we used Rand() but no luck.
@vijayan_ja you have to break the ties somehow, why not add index column which will be unique for each record and then break ties based on that, it should be easy, no?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
The Rand() function dosen't given the expected output.
Maybe you can add a super insignificant amount to your sum?
Like:
[SumwithContext] + (RAND()/1000)
Then you rank on this measure while still displaying [SumwithContext]?
As i mentioned, addind index column is not possible, due to the real time dataset.
interesting, well i guess you have to somehow find a unique record, seems like that is the requirement to solve your problem. I'm surprise that random didn't worked.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.