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
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
Community Champion
Community Champion

@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...



Follow on LinkedIn
@ 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!:
DAX For Humans

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
Community Champion
Community Champion

@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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors