March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I have a table with the format below with dimensions coming from multiple tables and sales coming from the fact table.
I would like to be able to filter the table based on the top N values of the combination of the columns. However the only way to use top N is on one dimension only.
I then tried to create a rank measure using CROSSJOIN but it is not working properly and sometimes when I see the ranking it puts a ranking of 2 for example to two rows that have completely different numbers.
My goal is to be able to create a Rank Measure for the combination of the three columns below of Country, Product, and Year without having to combine them in one column.
My Rank measure should result in the below:
Country | Product | Sales | Year | Rank |
US | A | 10000 | 2024 | 1 |
ES | A | 2000 | 2024 | 6 |
FR | B | 5000 | 2024 | 3 |
AA | A | 1000 | 2024 | 9 |
PT | B | 1500 | 2024 | 7 |
US | B | 5500 | 2025 | 2 |
ES | B | 4000 | 2025 | 4 |
FR | A | 3500 | 2025 | 5 |
AA | D | 800 | 2025 | 10 |
PT | A | 1200 | 2025 | 8 |
Thanks a lot!
Solved! Go to Solution.
Hi @aerizk
If your model is something like :
You can use the DAX :
PBIX is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
hi Rita, that works. Thanks a lot!
Happy to help 😊
Hi @aerizk
If your model is something like :
You can use the DAX :
PBIX is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |