This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello everyone,
I am facing an issue with the RANKX DAX.
My requirement is to get best performing months year based on the total sales for each consultant with their respective locations and then I need to display TOP 50 records from this recordset based on Total Sales.
I am able to get best performing month year for each consultant with their respective locations by using RANKX function. Now I want to get only TOP 50 records from this record set in my table.
Below is my DAX to get best performing month year:
Rank Month Year =
RANKX(
CALCULATETABLE(
VALUES('T1'[Month Year]),
ALLSELECTED('T1'[Month Year])
),
[Total Sales],,
DESC,
Dense
)
Solved! Go to Solution.
Hi @harsh_bi_dev ,
You can create a new measure as
Measure = IF([Rank Month Year]<=50,1)
Then put this measure into Filters, and set show items when the value is 1
You can see the simple sample from the attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @harsh_bi_dev ,
You can create a new measure as
Measure = IF([Rank Month Year]<=50,1)
Then put this measure into Filters, and set show items when the value is 1
You can see the simple sample from the attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@harsh_bi_dev
You can incorporate with IF function if you are showing the measure against each consultants
=IF ( [Rank Month Year] <= 50 , [TOTAL SALES] )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hello @Fowmy,
Thanks for the quick reply. But it will not solve my problem. I want TOP 50 groups of Location, Consultants and Month Year.
Hope this makes sense.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 31 | |
| 26 | |
| 23 |