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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Help with date range

Hi! 

I have this Ticket_history table: 

IDTicketIDUpdatedstatus

1

592020-04-12 15:00opened
2592020-04-12 16:00work
3592020-04-12 17:00waiting for customer
4592020-04-12 18:00work
5592020-04-12 19:30waiting for customer
6592020-04-12 20:00closed



I need to be able to get the amount of hours this ticket has been open and subtract the amount of hours it has been waiting for customer.

We are waiting for customer 17 -> 80 and 19:30 -> 20 = 1.5 hours
Result TicketTable:

IDhours openhours waiting for customer 
5951.5 
1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous ,

the following solution works if each TicketID

  • has one open and one closed status
  • has only two waiting for customer status, the first followed by work status and the other by closed status.

Source data is:

12-04-_2020_18-04-56.pngSolution:

12-04-_2020_18-08-40.png

 

Regards FrankAT

 

View solution in original post

2 REPLIES 2
FrankAT
Community Champion
Community Champion

Hi @Anonymous ,

the following solution works if each TicketID

  • has one open and one closed status
  • has only two waiting for customer status, the first followed by work status and the other by closed status.

Source data is:

12-04-_2020_18-04-56.pngSolution:

12-04-_2020_18-08-40.png

 

Regards FrankAT

 

@Anonymous how did you get to waiting hours 80 min and 20 min = 100 min (1.5 hours)?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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