Forum Discussion

JoeKulasa's avatar
JoeKulasa
Regular Visitor
5 years ago
Solved

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:

 

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".

 

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

 

 

2 Replies

  • DataZoe's avatar
    DataZoe
    Microsoft Employee

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

  • Anonymous's avatar
    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