Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Community, I'm trying to get the value from the previous month in the following table, which is about trying to see if there was a change in the employee status (employee is "active" or "on leave"). Does anyone know how to get it? I already found some ideas in older chats but I didn't manage to make it work.
Thank you in advance!
Month/Year | Employee ID | Status | Status PRV Month |
30.06.2024 | 1188 | On Leave | |
30.06.2024 | 1066 | On Leave | |
30.06.2024 | 1100 | Active | |
30.06.2024 | 900 | Active | |
30.06.2024 | 1155 | Active | |
30.06.2024 | 1245 | Active | |
30.06.2024 | 1056 | Active | |
31.07.2024 | 1188 | Active | On Leave |
31.07.2024 | 1066 | Active | On Leave |
31.07.2024 | 1100 | On Leave | Active |
31.07.2024 | 900 | Active | Active |
31.07.2024 | 1155 | Active | Active |
31.07.2024 | 1245 | Active | Active |
31.07.2024 | 1056 | Active | Active |
31.08.2024 | 1188 | Active | Active |
31.08.2024 | 1066 | Active | Active |
31.08.2024 | 1100 | On Leave | On Leave |
31.08.2024 | 900 | Active | Active |
31.08.2024 | 1155 | Active | Active |
31.08.2024 | 1245 | On Leave | Active |
31.08.2024 | 1056 | Active | Active |
I already tried this without success:
Solved! Go to Solution.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
@Werfuks - It looks like you have not created a date table, which is essential for doing time intelligence calculations. You can build a simple one using CALENDARAUTO() when creating a calculated table. There is also a great video of options here: https://www.youtube.com/watch?v=WybnTHDl-AM
Once you have done this, make sure you create a relationship between your new date table date column and the date column in your Basisdaten_Headcount table.
You can then use the following DAX to create the measure - you will need to change names to suit your model:
CALCULATE( [Measure], DATEADD('Date Table'[Date Column],-1,MONTH)
If this works for you, pelase accept it as the solution for others - it helps with visibility.
@Werfuks - It looks like you have not created a date table, which is essential for doing time intelligence calculations. You can build a simple one using CALENDARAUTO() when creating a calculated table. There is also a great video of options here: https://www.youtube.com/watch?v=WybnTHDl-AM
Once you have done this, make sure you create a relationship between your new date table date column and the date column in your Basisdaten_Headcount table.
You can then use the following DAX to create the measure - you will need to change names to suit your model:
CALCULATE( [Measure], DATEADD('Date Table'[Date Column],-1,MONTH)
If this works for you, pelase accept it as the solution for others - it helps with visibility.