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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Jessica_17
Helper IV
Helper IV

Rank creation for measure value which ahs duplicates

Hello All,
I am facing one issue while creating rank, I want to create rank based on job_qty orders for each row for each hour step.

Can anyone please help me?

Input:-

Hour_stepbi_jh_eq_nojob_qtyrank
202309903 26411
202309903 25931
202309903 26031
202309903 26331
202309903 26531
202309903 26831
202309903 27931
202309903 28031
202309903 21041
202309903 26241
202309904 27011
202309904 27141
202309904 27341
202309904 27841
202309904 26651
202309904 27251
202309904 27751
202309904 27661
202309904 27571

 

Output required:-

Hour_stepbi_jh_eq_nojob_qtyrank_job
202309903 26411
202309903 25932
202309903 26033
202309903 26334
202309903 26535
202309903 26836
202309903 27937
202309903 28038
202309903 21049
202309903 262410
202309904 27011
202309904 27142
202309904 27343
202309904 27844
202309904 26655
202309904 27256
202309904 27757
202309904 27668
202309904 27579

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jessica_17 , Try new Rank function, assuming Job_qty is a meausre

 

Rank(dense, allselected(Table[Hour_step], Table[bi_jh_eq_no]), orderby([job_qty], desc, Table[bi_jh_eq_no], asc))

 

 

Power BI - New DAX Function: RANK - How It Differs from RANKX: https://youtu.be/TjGkF44VtDo

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Jessica_17 , Try new Rank function, assuming Job_qty is a meausre

 

Rank(dense, allselected(Table[Hour_step], Table[bi_jh_eq_no]), orderby([job_qty], desc, Table[bi_jh_eq_no], asc))

 

 

Power BI - New DAX Function: RANK - How It Differs from RANKX: https://youtu.be/TjGkF44VtDo

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.