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