Forum Discussion
TSI
7 years agoAdvocate I
Previous Month Value (return Text)
Hi Community, I have a table of employee IDs and their Pay Grades each month. I'm trying to create a new column 'Previous Month' which would show me the Pay Grade from the month before. ...
- 7 years ago
TSI try following measure
Prev Pay Grade = VAR __prevDate = CALCULATE( MAX( 'Table'[Calendar Date] ), FILTER( ALLEXCEPT( 'Table', 'Table'[Employee ID] ), 'Table'[Calendar Date] < MAX( 'Table'[Calendar Date] ) ) ) RETURN CALCULATE( MAX( 'Table'[Pay Grade] ), ALLEXCEPT( 'Table', 'Table'[Employee ID] ), 'Table'[Calendar Date] = __prevDate )
parry2k
4 years agoSuper User
_Kevin_ Thanks for the feedback. Glad you find the solution useful for your use case.
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.