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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JoeKulasa
Regular Visitor

Changing RankX based on 2 values

My data contains two separate screenshots:

 

1)  Rank is working properly (resets to 0) by resetting when "Shift" changes:

JoeKulasa_2-1618493322995.png

 

2)  Rank is not resetting to 0 further down in the data when shift changes, because it's continuing from the last time it saw "Shift 3".

JoeKulasa_3-1618493445529.png

 

How do I change my rank measure to reset to 1 everytime a new shift is seen every day?

 

JoeKulasa_4-1618493553534.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JoeKulasa ,

 

Refer:

Column = RANKX(FILTER('Table','Table'[day]=EARLIER('Table'[day])&&'Table'[shift]=EARLIER('Table'[shift])),'Table'[value],,ASC)

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @JoeKulasa ,

 

Refer:

Column = RANKX(FILTER('Table','Table'[day]=EARLIER('Table'[day])&&'Table'[shift]=EARLIER('Table'[shift])),'Table'[value],,ASC)

 

Best Regards,

Jay

DataZoe
Microsoft Employee
Microsoft Employee

@JoeKulasa I would first try to add in another line, like 5, that is [Day] = earlier([Day] in the FILTER.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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