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 need to know the proper DAX to accommodate a couple of data filters on an allocation table.
I need to get headcount that can be filtered by Month where the employee has a start date before on the 1st day of the filtered month AND where their end date is either blank or less than the last day of that filtered month.
An example would be I filter on March:
I want all employees that have a start date <= 3/31/2019 and an end date that is blank or >= 3/1/2019
How do I write a general DAX formulat that takes into count what the filtered month is. I don't want to hard code dates into anything.
Head Count =
CALCULATE (
DISTINCTCOUNT ( Table[Employee ID] ),
where
Table[Start Date] <= Filtered Month (last day of that month)
AND
(Table[End Date] ISBLANK OR Table[End Date]>= Filtered Month( the first day of that filtered month)
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 |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |