Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
We have a table with tasks. Each task has a unique ID, a start date and an end date. We would like to calculate the number of days it took from start to finish. We know that we can subtract the dates to get to that number.
However, we would like to calculate the number of actual working days, not just calendar dates. We have a table with every day in the year, including the day of the week and indicating if the day is a holiday.
How can we calculate the actual number of working days?
Hi,
I assume you have 2 tables: taskInfo and holidayInfo. See screenshot below.
1. create relationships between these 2 tables:
2. create a column called “countOfdays “ in “taskInfo” table:
countOfdays = DATEDIFF([start date], [end date], DAY) + 1
3. create a column called “countOfHolidays “ in “taskInfo” table:
countOfHolidays = COUNTAX(Filter(holidayInfo, holidayInfo[date] >= taskInfo[start date] && holidayInfo[date] <= taskInfo[end date] && holidayInfo[isHoliday] = "Y"), holidayInfo[isHoliday])
4. create a column called “workingDays” in “taskInfo” table:
workingDays = [countOfdays] - [countOfHolidays]
Now you will see the result:
Best Regards
Alex
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 93 | |
| 81 | |
| 73 | |
| 46 | |
| 35 |