cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User IV
Super User IV

Use a Date table wihtout weekends?


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Microsoft
Microsoft

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

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors