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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I have this table:
Country Company CountCo CountB System date
Brazil M 1 1 09/01/2023
Brazil P 2 2 09/01/2023
Mexico P 1 1 09/01/2023
Australia F 2 2 07/01/2023
Germany Z 1 1 07/01/2023
New Zeland F 1 1 07/01/2023
Indonesia R 1 1 06/01/2023
Japan A 1 1 06/01/2023
Country, Company,System date: columns
CountCo (count of company per country), CountB (count of code per country): measures
How can i do a rank in order to get only the first 5 rows of this table ? . I mean:
Country Company CountCo CountB System date Rank
Brazil M 1 1 09/01/2023 1
Brazil P 2 2 09/01/2023 2
Mexico P 1 1 09/01/2023 3
Australia F 2 2 07/01/2023 4
Germany Z 1 1 07/01/2023 5
I've tried with this code, but i got wrong outputs.
Best
Solved! Go to Solution.
Ibendlin,
Thank you for your suggestion.
I finally solved creating a table like this:
Best!
Ibendlin,
Thank you for your suggestion.
I finally solved creating a table like this:
Best!
That is not something you can do in DAX. Add an index column in Power Query, or further upstream.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 20 | |
| 12 | |
| 10 |