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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JenWilson
Helper II
Helper II

Calculate date difference excluding weekends

Hi, 

I am trying to see the difference in days between when we are expecting to receive a shipment and the date the shipment actually arrives. The calculated column below is showing values correctly for shipments that are received on time (results 0 if dates are a match) or late (example: Expected Date is 04/26/2023 and Received Date is 05/01/2023 result is 3). However, for shipments that are received earlier then the Expected Date, the result is always showing -1. Is there something wrong with the formula below? 

 

Date Difference = CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar',WEEKDAY('Calendar'[Date],2)<6),DATESBETWEEN('Calendar'[Date],'DataTable'[Expected Date],'DataTable'[Received Date]))-1

1 REPLY 1
Idrissshatila
Super User
Super User

Hello @JenWilson ,

 

check this video, it helped me with a similar case.

https://youtu.be/6JA6uy3ZRBA

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors