Forum Discussion
Using Earlier() command for lag
- Anonymous6 years ago
HI Anmol ,
Let me know if this works for you.
Create Calculated Columns
Previous_Value = CALCULATE(MAX('Table'[Input_Priority]),FILTER('Table','Table'[Task_Id] = EARLIER('Table'[Task_Id]) && 'Table'[Request_DateTime] < EARLIER('Table'[Request_DateTime] )))RANK_ = RANKX(FILTER('Table','Table'[Task_Id] = EARLIER('Table'[Task_Id])),'Table'[Request_DateTime],,ASC,Dense)Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi Anmol
Can you show a sample of the table you are using and explain with an example based on that data/table what you would need?
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Anmol6 years agoFrequent Visitor
That's how the data looks like, im just looking for a calculated column that gives previous 'input_priority' only after sorting the data on 'task_id' and 'request_datetime'.
- Anonymous6 years agoNot applicable
HI Anmol ,
Let me know if this works for you.
Create Calculated Columns
Previous_Value = CALCULATE(MAX('Table'[Input_Priority]),FILTER('Table','Table'[Task_Id] = EARLIER('Table'[Task_Id]) && 'Table'[Request_DateTime] < EARLIER('Table'[Request_DateTime] )))RANK_ = RANKX(FILTER('Table','Table'[Task_Id] = EARLIER('Table'[Task_Id])),'Table'[Request_DateTime],,ASC,Dense)Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)