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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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