Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper I
Helper I

Days between 2 date columns to be calculated but also exclude saturdays and sundays

Requirement - I am trying to calculate the number of days between 2 date columns ('Date of referral' and 'Date of initial attempted contact) , excluding saturday and sunday.  Then convert the total days to hrs as I need to show whether the time between the 2 dates is <= or => 24 hrs.



1) In Power Query Editor, on table called 'Case atts and case atts values merged', I have a custom column called 'Date of intial attempted contact minus date of referral - KPI 3'. 

The custom query is = [Date of initial attempted contact]-[Date of referral] fields.

This gives me the days between dates.


I also have a date table (called 'Date") which sets out a column called 'IsWorkingDay' showing Saturday and Sunday as False (all other days are True).


How do I use the date table to exlude saturday and sunday from my custom query of [Date of initial attempted contact]-[Date of referral] days between dates??


Really looking for some help as struggling!



Super User
Super User

Super User
Super User

@mitchpj75 , refer to the 2nd page - working day on the attached file after the signature of the blog


Thank you for the response! I did look at these as the solution but I still struggled however through further searching I was able to do what I need with the following:


Watched this first -

Then used the code here to setup the UI and it worked -


All seems overly complicated to work out the number of working days between dates but the solutions worked.


Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors