Forum Discussion
Workforce development graph based on contract dates
- 1 year ago
Hi FlorisMK ,
In order to deal with the headcount issue using dax, the best practice is to use the following tables which you have specified in your message:
- The employee table with start and end dates
- Calendar table
and then set these tables as disconnected tables and write a measure like below:
Headcount = SUMX ( EmployeeFact, IF ( EmployeeFact[Start] <= [SelectedDate] && EmployeeFact[End] >= [SelectedDate], 1, BLANK () ) )For the details of how to set up the data model, please refer to the article below:
Dynamic Headcount Analysis using Dax - Microsoft Fabric CommunityBest regards,
Hi FlorisMK ,
In order to deal with the headcount issue using dax, the best practice is to use the following tables which you have specified in your message:
- The employee table with start and end dates
- Calendar table
and then set these tables as disconnected tables and write a measure like below:
Headcount =
SUMX (
EmployeeFact,
IF (
EmployeeFact[Start] <= [SelectedDate]
&& EmployeeFact[End] >= [SelectedDate],
1,
BLANK ()
)
)
For the details of how to set up the data model, please refer to the article below:
Dynamic Headcount Analysis using Dax - Microsoft Fabric Community
Best regards,