Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX Ranking

Hello,

 

I have a following scenario

 

achillies21_1-1620939496512.png

I would like to rank based on the Priority. For example, all the promotions, products with highest priority (for example 2) should get first rank and the subsequent less order priority should 2nd rank and so on...

 

Please provide suggestions.

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Check the formula.

Column = RANKX('Table','Table'[priority],,DESC,Dense)

1.PNG

 

Best Regards,

Jay

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Check the formula.

Column = RANKX('Table','Table'[priority],,DESC,Dense)

1.PNG

 

Best Regards,

Jay

Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=calculate(distinctcount(Data[Priority]),filter(data,data[promotion]=earlier(data[promotion])&&data[priority]>=earlier(data[priority])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I am sorry it can't be shared as it has business data

Anonymous
Not applicable

Hi,

 

I am looking for a calcualted column

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Should this be a calculated column formula or a measure?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.