Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
I have:
I want:
So far, I've done the heavy lifting for this chart in Excel, and imported the Excel result into Power BI. This is cumbersome, especially since Excel doesn't do stepped charts at all, so I had to do some previous date tricks to get it working at all.
I suspect there's an easier way to do it in Power BI, but I'm not sure how. Use the Calendar dates as input for a measure in the People table, which compares to the contract dates to determine whether the record should be counted? Chart that measure somehow? I'm still getting my head around measures in general, so any help is greatly appreciated!
Solved! Go to Solution.
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:
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,
@DataNinja777 That's great, thanks! The article you link to has a wealth of information on wha I need.
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:
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,
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 53 | |
| 42 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 111 | |
| 104 | |
| 35 | |
| 28 | |
| 27 |