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
Anonymous
Not applicable

DateTime Difference excluding weekends/holidays

Hi,

 

How do I calculate the difference between two datetime columns and exclude weekends/holidays from the calculation?

I have created a standard calendar table and a public holidays table but not sure how to marry them together. 

 

Appreciate any help. 

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @Anonymous 

Probably best is to merge both tables. Just add a new column to the main calendar table specifying whether a day is a holiday and another columns  whether it's weekday or weekend. Then you can just calculate the date difference by count the number of days in between your two dates excluding holidays and weekends.

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

 

Anonymous
Not applicable

@AlB that makes sense and makes it easier to manage. Will try that. Thank you.

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.