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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello All,
I am struggling to create a measure to display the rank in a table. I have a table with the following columns
Promo Name, Start Date, Region, Total Quoted Sales. I am trying to display the rank by Promo Name and Start date based on the sum of total sales.
My current measure is:
If I create a column key unique for each Promo Name and Start date then each rank is just one. Any help would be appreciated
Solved! Go to Solution.
Hi, @kaylastarr
I create a table:
You can use the following DAX expression:
Rank Test =
ROWNUMBER (
ALLSELECTED ( 'Table'[Promo Name], 'Table'[Start Date] ),
ORDERBY ( 'Table'[Promo Name], DESC, 'Table'[Start Date], ASC )
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @kaylastarr
I create a table:
You can use the following DAX expression:
Rank Test =
ROWNUMBER (
ALLSELECTED ( 'Table'[Promo Name], 'Table'[Start Date] ),
ORDERBY ( 'Table'[Promo Name], DESC, 'Table'[Start Date], ASC )
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Obligatory SQLBI link: https://www.sqlbi.com/articles/use-of-rankx-in-power-bi-measures/
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
9 | |
8 | |
8 |