Forum Discussion
Dynamic HR listing using date slicer
- 1 year ago
Your slicer needs to be fed by a disconnected Dates table, and then you need to use measures to read the slicer value and calculare data visibility accordingly.
- 1 year ago
Hi cocohoney ,
Building on lbendlin's solution to use a disconnected calendar table, let me provide additional guidance on how to implement it. To achieve your required snapshot at any point in time, your data model would look as follows:
Next, you can write a DAX measure like the one below:
Position held = SUMX ( EmployeeFact, IF ( EmployeeFact[STARTING DATE POSITION] <= max('Calendar'[Date]) && EmployeeFact[ENDING DATE POSITION] >= max('Calendar'[Date]), 1, BLANK () ) )The output looks like this, and you can use the yyyy-mm slicer to get the snapshot for your selected date.
I have attached an example pbix file for your reference.
Best regards,
Hi cocohoney ,
Building on lbendlin's solution to use a disconnected calendar table, let me provide additional guidance on how to implement it. To achieve your required snapshot at any point in time, your data model would look as follows:
Next, you can write a DAX measure like the one below:
Position held =
SUMX (
EmployeeFact,
IF (
EmployeeFact[STARTING DATE POSITION] <= max('Calendar'[Date])
&& EmployeeFact[ENDING DATE POSITION] >= max('Calendar'[Date]),
1,
BLANK ()
)
)
The output looks like this, and you can use the yyyy-mm slicer to get the snapshot for your selected date.
I have attached an example pbix file for your reference.
Best regards,
Thank you so much DataNinja for the extended help provided and taking the time to implement my usecase in pbi.
It is very much appreciated