cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VK7
Frequent Visitor

Date Difference by excluding weekends & holidays

Hello,
I'm having two date columns as shown below, I need to bring the output as the difference between start & end date.
1) While achieving this I should Ingore the Weekends. (eg. Sat & Sun)
2) I'm having local holidays list, need to ignore that as well while taking differences.
OUTPUT format should be in hours. (eg. 26.01.2023 as hoilday)

VK7_1-1675830717044.png


Thank you in advance.

 

1 ACCEPTED SOLUTION
Ahmedx
Solution Sage
Solution Sage

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://dropmefiles.com/x9SCB
Screen Capture #274.png

View solution in original post

5 REPLIES 5
Ahmedx
Solution Sage
Solution Sage

If you need to pull a list of holidays from another table, then, of course, you can
https://dropmefiles.com/gsg8d
Screen Capture #279.pngScreen Capture #280.png

Ahmedx
Solution Sage
Solution Sage

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://dropmefiles.com/x9SCB
Screen Capture #274.png

Ahmedx
Solution Sage
Solution Sage

let's say that the holidays are the following days (2023, 01, 19 - 2023, 01, 26 )
are you expecting this result?
Screen Capture #272.png

VK7
Frequent Visitor

Hi Ahmedx,

I've edited the initaly request more elaborately. 

VK7_0-1675830967104.png

 



@VK7 , refer if this can help

https://exceleratorbi.com.au/calculating-business-hours-using-dax/

 

you have convert to days and hours post that



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors