Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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,
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |