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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
lynnzrae
Helper I
Helper I

Datediff but excluding if there is a pause in work time

I would like to calculate the amount of time between Submitted for Review and a Decision being made.  However, there are times when there is a pause of work and I want to exclude that time; but the pause doesn't always occur.  Can someone please help me create a DAX exploring: 

 

Datediff (in days) between submitted for review and decision rendered excluding the time between project pause and project restart (if there is a pause)

1 ACCEPTED SOLUTION

I will work on this. thank you.  It just dawned on me that we also don't include weekends and federal holidays.  Is it possible to somehow pull that in to the caluclation as well?

 

Thank you

 

View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@lynnzrae  Ensure you have columns for "Submitted for Review", "Decision Rendered", "Project Pause", and "Project Restart".

Create a calculated column to determine the total number of days the project was paused.

Subtract the total pause duration from the overall duration between "Submitted for Review" and "Decision Rendered".

 

DAX
-- Step 1: Calculate the total pause duration
TotalPauseDuration =
SUMX(
FILTER(
YourTable,
NOT(ISBLANK(YourTable[Project Pause]) && ISBLANK(YourTable[Project Restart]))
),
DATEDIFF(YourTable[Project Pause], YourTable[Project Restart], DAY)
)

-- Step 2: Calculate the net duration excluding pauses
NetDuration =
DATEDIFF(YourTable[Submitted for Review], YourTable[Decision Rendered], DAY) - YourTable[TotalPauseDuration]

 

For more details share sample data and exact required data

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






I ceated the below and received an error message: Too Many arguments were passed to the sum function.  The maximum argument count for the funtion is 1.  Can you please advise on where I went wrong?  Thanks.

 

Total Period of Paused Review =

SUM(

FILTER(

TPermitBRGCycle,

NOT(ISBLANK(TPermitBRGCycle[CG-BRG-2 Paused; Start Date])&&ISBLANK(TPermitBRGCycle[CG-BRG-2 Restart; Complete Date]))

),

DATEDIFF(TPermitBRGCycle[CG-BRG-2 Paused; Start Date],TPermitBRGCycle[CG-BRG-2 Restart; Complete Date], DAY)

)

I will work on this. thank you.  It just dawned on me that we also don't include weekends and federal holidays.  Is it possible to somehow pull that in to the caluclation as well?

 

Thank you

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.