Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Employees' ID have multiple entries (duplicated) sometimes more than once in the start date Ex.:
Emp ID | Dep | Start date | End date | Status |
23232A | C | 12/12/1999 | 12/12/2001 | Active |
23232A | B | 12/12/1999 | 31/12/2020 | Active |
23232A | C | 12/12/1999 | 02/05/2024 | Active |
1- I would like to adjust the start date to be the end date of the previous (Latest) one and so.
Solved! Go to Solution.
Hi @O-K
You can get your required output as follows:
1- I would like to adjust the start date to be the end date of the previous (Latest) one and so.
2- keeping only one Active status per employee (Latest)
In addition to this, you can create a disconnected calendar table to do a flexible headcount analysis, but I didn't create a calendar table in this example.
I attach an example pbix file.
Firstly thank you for the quick response.
I somehow keep getting an error in the second half
Hiii Try this DAX
Adjusted Department StartDate =
VAR Departmentstartdate =
CALCULATE(
MAX('EU HR'[Adjusted End/present day]),
FILTER(
'EU HR',
'EU HR'[Adjusted End/present day] < EARLIER('EU HR'[Adjusted End/present day])
)
)
RETURN
IF(
ISBLANK(Departmentstartdate),
'EU HR'[Adjusted End/present day],
Departmentstartdate
)
Hi @O-K
It seems that your formula is missing close bracket for max formula. Please look at the braket below the star mark in the screen shot.
Best regards,
Hii Please use this DAX copy and paste
A , is missing after max()
Adjusted Department StartDate =
VAR Departmentstartdate =
CALCULATE(
MAX('EU HR'[Adjusted End/present day]),
FILTER(
'EU HR',
'EU HR'[Adjusted End/present day] < EARLIER('EU HR'[Adjusted End/present day])
)
)
RETURN
IF(
ISBLANK(Departmentstartdate),
'EU HR'[Adjusted End/present day],
Departmentstartdate
)
If this solution helped you please give a thumbs up and accept this reply as a solution Thank You!! Regards!!
Hi @O-K
You can get your required output as follows:
1- I would like to adjust the start date to be the end date of the previous (Latest) one and so.
2- keeping only one Active status per employee (Latest)
In addition to this, you can create a disconnected calendar table to do a flexible headcount analysis, but I didn't create a calendar table in this example.
I attach an example pbix file.
Firstly thank you for the quick response.
I somehow keep getting an error in the second half
Hiii Try this DAX
Adjusted Department StartDate =
VAR Departmentstartdate =
CALCULATE(
MAX('EU HR'[Adjusted End/present day]),
FILTER(
'EU HR',
'EU HR'[Adjusted End/present day] < EARLIER('EU HR'[Adjusted End/present day])
)
)
RETURN
IF(
ISBLANK(Departmentstartdate),
'EU HR'[Adjusted End/present day],
Departmentstartdate
)
Hiiii
Adjusting Start Dates:
Keeping Only One Active Status Per Employee:
Thank you for taking the time to reply.
Some IDs are have more than 3 or more entries and some just mentioned once. That's probably why the Previous Row isn't working.
Adjusting Start Dates:
Keeping Only One Active Status Per Employee:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
35 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |