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
nadirS
Helper I
Helper I

Date & Time functions

I am trying to work on a dashboard that gives me the number of hours taken to complete a task. I need to take into consideration US Holidays, Weekends, and the regular workoing hours from 8:00 am to 5:00 pm. If a request comes in on a holiday it should move to the next working day starting at 8:00 am. If a request comes in on a Friday after 5:00 pm, it should start from Monday at 8:00 am. The dashboard needs to be accurate to hours since some requests need to be completed in 2 hours and some have a 3 day limit.   

My data is coming from Sharepoint which has the create date and the completion date. PLEASE HELP ! 

7 REPLIES 7
Greg_Deckler
Super User
Super User

@nadirS - See my Net Work Duration quick measure: 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...

2 issues here:

1) it is giveing me a -67 value for the entire column - I do not know why that is

2) if a request is coming in after 5:00 pm on Monday, the start time needs to be updated to 8:00 am on a Tuesday.

Hi , @nadirS 

Not   fully sure what are your issues. 

Can you elaborate a bit more, provide some screenshots to explain what you are trying to do.

It would be better if you can share sample files for testing.

 

Best Regards,
Community Support Team _ Eason

 

So i have the attached table, the Date completed, Date Recieved and Requestor Name are the only 3 fields i have. I am working to prepare an SLA Dashboard that can give me the time spent between date recieved and date completed. Request can come in at any time (Weekends, Holidays, Night, Morning etc). if a request comes in on friday at 6:00 pm i need to start the calculation on Monday 8:00am. Basically if a request comes in outside of working hours i need it adjusted to show next day at 8:00 am.

Working hours are between 8:00 am to 5:00 pm. i need to calculate time spent on requests within working hours, holidays, weekends should be ignored.   

I dont have anyting have a sample file to show, the only things i have are dates and names. Date format M/DD/YYYY HH:MM:SS

 

 

nandukrishnavs
Super User
Super User

@nadirS 

 

Please provide sample tables and expected output in a table.

 

Also, read this blog - How to Get Your Question Answered Quickly

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 


Regards,
Nandu Krishna

Thank you for your reply, for the input i really do not have anything other than the create date, completed date and Completed by from sharepoint. For the output if i can get the number of hours spent on a task i can create the visualization.

The dates (request recieved and completed) are in the following format.  

 
DateReceivedDateCompletedCompletedBy
5/14/2020 11:49:00 AM5/14/2020 03:21:00 PMNS
7/10/2020 10:00:00 AM7/15/2020 04:11:00 PMJP

@nadirS 

 

Check out this video, this may help you.

https://www.youtube.com/watch?v=GLIoDbOiJgw


Regards,
Nandu Krishna

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.