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

Date Difference excluding weekends

I have a starting date and an ending date and I need to count only the working days in between,

 

i have created New Date Table (ftCalendar) then i have tried this new column

 

WorkingDays =
CALCULATE(
COUNTROWS ( 'ftCalendar'),
DATESBETWEEN ( 'ftCalendar'[Date], Table[RequestClosedDate], Table[RequestReceivedDate] -1 ),
'ftCalendar'[DateIsWorkingDay] = TRUE,
ALL ( Table )
)
 
 
 i have tried Power Query also 
 
Get Data --> Blan Query  then i have used
 
= (InitialDate as date, FinalDate as date ) as number =>
let
DaysBetweenDates = Duration.Days(FinalDate-InitialDate),
DaysList = List.Dates(List.Min({InitialDate,FinalDate}),Number.Abs(DaysBetweenDates)+1, Duration.From(1)),
WeekDaysList = List.Select(DaysList, each (Date.DayOfWeek(_, Day.Monday) < 5) ),
WorkingDays = (if DaysBetweenDates < 0 then -1 else 1) * List.Count(WeekDaysList)
in
WorkingDays
 
 
it's Not working
 
 
 
 
 

Thanks in advance,

Rajesh

3 REPLIES 3
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Look at these solutions

 

https://community.powerbi.com/t5/Desktop/Time-to-resolution-excluding-Weekends/m-p/1127330

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362

 

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Just checked you DAX function and its working fine?

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

Hi @Mariusz   Thanks for your Reply

 

It's Not working for me, i don't know what is the issue  Herewith i have attached my PBIX fileClick Here Could you please check this?

 

Regards,

Rajesh R

 

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.