Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
MF_BSC
New Member

How to calculate the through put time of a process for partial workdays only

I am trying to create a through put time for a process.   The output I am looking for is the hours in decimal format with one decimal place from the StartDate to FinishDate including partial days however excluding weekends.  I have gotten the report to output DateDiff in hours including partial days in correct format however it includes weekends, I have gotten NetworkDays to work in hours however it rounds up to the complete day.  I have gotten Datediff to list workdays only but not partial days in hours.  Is there a why to get the output in hours for partial workdays only?

MF_BSC_0-1739285836929.png

Lead time DateDIFF in DAX =
 DATEDIFF(Query1[StartDate],Query1[FinishDate],HOUR)+
     (DATEDIFF(Query1[StartDate],Query1[FinishDate],MINUTE)
     -DATEDIFF(Query1[StartDate],Query1[FinishDate],Hour)*60)/60
 vs
Lead time DateDIFF in DAX =
 DATEDIFF(Query1[StartDate],Query1[FinishDate],HOUR)+
     (DATEDIFF(Query1[StartDate],Query1[FinishDate],MINUTE)
     -DATEDIFF(Query1[StartDate],Query1[FinishDate],Hour)*60)/60
 

vs

Lead time Datediff test =
VAR _Datediff=
CALCULATE(
    SUM('Dates_2024'[Weekday]),
    DATESBETWEEN('Dates_2024'[Date],'Query1'[StartDate],'Query1'[FinishDate])
)-1
RETURN
IF(_Datediff<0,0,_Datediff)
1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @MF_BSC ,

 

Since you have start dates and end dates, the best approach to address your requirement is to use a disconnected calendar table to calculate the duration flexibly. With the disconnected table, you will be able to address the weekend etc., and time intelligence function in the calendar table.

 

Best regards,

View solution in original post

3 REPLIES 3
DataNinja777
Super User
Super User

Hi @MF_BSC ,

 

Since you have start dates and end dates, the best approach to address your requirement is to use a disconnected calendar table to calculate the duration flexibly. With the disconnected table, you will be able to address the weekend etc., and time intelligence function in the calendar table.

 

Best regards,

I found an you tube video that does just as you described.

Calculated Busines Hours using DAX (Working Hours in Power BI & Power Pivot-Excel) by Power GI

johnt75
Super User
Super User

You could combine the approaches you have tried. First work out the total difference including non-working days, then count the number of working days, multiply that by 24 and take it off the total difference.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.