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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

To Show how long a task took between 2 dates / times not including weekends

Hi All

 

I'm hoping this is a fairly easy one

 

In my date i have 2 columns

 

Submission Date = 11/03/2020 17:20:06

Marked Date = 12/03/2020 10:01:42

 

I have 3rd column - this is the column im trying to Create

Time Within 24hrs SLA = 17

Code Used: 

Time Within 24hr SLA = DATEDIFF('Activity Submission'[Submission Date],'Activity Submission'[Marked Date Time],HOUR)
 
But the 2 bits i would like to add - which I'm super struggling with is
 
1) Answer to show in DD:H:M:SS
2) If a submission falls on a weekend, the weekend days are not to be included in the SLA period
 
Example it's submitted on the Saturday the SLA doesn't start until the Monday and similarly if it's
submitted on the Friday it misses the weekends but contines onto Monday
 
Thank you all for your help in advance !
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Maybe:

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

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi Hope you are well

 

I have tried a couple of the codes, and there do bring back a result but unfortunately there bring back the same result on every row

 

I think it because of the MAX Function?

 

I'm looking for the calculation to give me a different result for each row

 

Example 00days 5hours 30mins everyrow

 

Where i would like to see

 

00days 5hours 30mins

01days 2hours 22mins

00days 0hours 10mins etc

 

What would I need to change to make this work? Apologises and fairly new to this so I don't quite understand all the different function

Thank you for your help in advance @Greg_Deckler 

Greg_Deckler
Super User
Super User

Maybe:

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

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Wow thank you for the quick response, I shall definitley take a look and get back to you and let you know which one worked!!

Greg_Deckler
Super User
Super User

You probably need a combination of these two:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Duration-Working-Hours/m-p/481543#M...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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