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
sannadisarath
New Member

difference between two days excluding weekends

Hi All,

 

How to i get difference between two dates excluding weekends, please let me know how should i do that.

2 REPLIES 2
AlexChen
Microsoft Employee
Microsoft Employee

Hi,

 

What does your “diffenence” mean?

 

If you want to calculate the days between 2 dates excluding weekends, I can give you a sample.

 

I assume you have a table called CntDays like screenshot below.

 

1.png

 

1. Add a custom column in query editor.

 

2.png

 

3.png

 

2. Expand the “Custom” column and convert it to date type.

 

4.png

 

3.  Calculate the “DayOfWeek” for “Custom” column.

 

5.png

 

4. Apply and close query editor. Add a new column to calculate weekdays.

 

Column = CALCULATE(COUNT(CntDays[DayOfWeek]), FILTER(all(CntDays), CntDays[DayOfWeek] <> 0 && CntDays[DayOfWeek] <> 6))

 

6.png

 

5. Now you can create a table visual to see count of days excluding weekdays.

 

7.png

 

Best Regards

Alex

 

Greg_Deckler
Community Champion
Community Champion

Use a Date table wihtout weekends?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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