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.
hi guys,
I'm struggling with the following problem:
I have two tables:
1. projects table. each row represents a project that has a "start date" and "End date"
2. regular calendar table
I want to add a column to the calendar table that calculates how many active projects were on this day.
tried to work with a straightforward calculate function but got the same result for each date:
Solved! Go to Solution.
Hi @SS0101 ,
You can try the following measure:
Measure =
var _select=SELECTEDVALUE('Calendar Table'[Date])
return
COUNTX(
FILTER(ALL('projects table'),
_select>='projects table'[StartDate]&&_select<='projects table'[EndDate]),[project])
Or add an ALL() function to the original Dax.
ALL function (DAX) - DAX | Microsoft Learn
If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SS0101 ,
You can try the following measure:
Measure =
var _select=SELECTEDVALUE('Calendar Table'[Date])
return
COUNTX(
FILTER(ALL('projects table'),
_select>='projects table'[StartDate]&&_select<='projects table'[EndDate]),[project])
Or add an ALL() function to the original Dax.
ALL function (DAX) - DAX | Microsoft Learn
If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanks Liu Yang!
that nearly solved my issues, however - In this setup, I can't use any slicer (doesn't have any effect). is it due to the ALL command? how can it be worked around?
thanks
You would need to inactivate the relationship between the calendar table and the projects table. Then for your visual use the date from the calendar table for the axis and your measure as the data.
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 |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |