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
atari35
Frequent Visitor

Calculate Business Hour TAT including half day saturdays

Hi, Im new on power bi and i need help with calculating a queries TAT. If one works between 8am and 5pm weekdays and 8am till 12pm on a saturday excluding sundays. Is there a way i can calculate the TAT of a query excluding as well the time when one is is not working?

 

Query Number                       Received_Time                    CompletionDate                     Status Turn       Around Time

12                                           21-06-2019 14:00                24-06-2019 10:00                Completed             9 hours

 

The above example shows a query that was logged on friday at 2pm. This means it should only calculate 3 hours for that day, then start counting on the saturday at 8am till 12 (add 4 hours) and continue counting on the monday till 10 am (2 hours).

2 REPLIES 2
Greg_Deckler
Super User
Super User

Perhaps look at using something like GENERATE. 
Take a look at these two Quick Measures as I think you want something like them.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365


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

Hi Greg,

 

Thank you for your reply. The generate function, does it also work with time? The examples you gave me are for date ranges and im looking to calculate by time

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.