Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Applicable88
Impactful Individual
Impactful Individual

Calculated the duration of two date columns, but only the productive days.

Hello,

how to create a calculated column like with the datediff(), but instead of counting everyday in between, taken into account that it only counts the "ProductiveDays" ? BookingDate-Incomedate e.g. Datediff( IncomeDate,BookingDate,Day)

 

BookingTable

IncomeDate BookingDate ID
2021-09-01 2021-09-01 8888
2021-09-02 2021-09-03 8889
2021-09-03 2021-09-06 8890
2021-09-06 2021-09-07 8891
2021-09-07 2021-09-07 8892
2021-09-08 2021-09-08 8893
2021-09-09 2021-09-14 8894
2021-09-10 2021-09-13 8895


Mastercalendar

DateWeekdayProductiveDay
2021-09-01Wednesday1
2021-09-02Thursday1
2021-09-03Friday1
2021-09-04Saturday0
2021-09-05Sunday0
2021-09-06Monday1
2021-09-07Tuesday1
2021-09-08Wednesday1
2021-09-09Thursday1
2021-09-10Friday1
2021-09-11Saturday0
2021-09-12Sunday0

 

Thank you very much in advance. 

Best. 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Applicable88 

I think you have the same question in 3 posts: Find the answer here: https://community.powerbi.com/t5/Power-Query/Networkdays-between-two-dates-dynamically/m-p/2099591

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@Applicable88 

I think you have the same question in 3 posts: Find the answer here: https://community.powerbi.com/t5/Power-Query/Networkdays-between-two-dates-dynamically/m-p/2099591

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Applicable88
Impactful Individual
Impactful Individual

Thanks @Fowmy , sorry for posting it also in the PowerQuery group. I wasn't quite sure if a DAX solution would be better or solve this already in PowerQuery. 

Thanks a lot!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.