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
NewBie0322
Regular Visitor

Ticket Duration by Support Group

Ticket duration by group Help please Would like to get some guidance to create DAX formula for ticket duration between groups. 

 

NewBie0322_0-1681303757585.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @NewBie0322 ,

 

Here are the steps you can follow:

1. Create calculated column.

Duration =
var _current=
MAXX(
    FILTER(ALL('Table'),'Table'[Ticket Number]=EARLIER('Table'[Ticket Number])&&'Table'[Ticket Update Date]=EARLIER('Table'[Ticket Update Date])),[Ticket Update Date])
var _Last=
MAXX(
    FILTER(ALL('Table'),'Table'[Ticket Number]=EARLIER('Table'[Ticket Number])&&'Table'[Ticket Update Date]<EARLIER('Table'[Ticket Update Date])),[Ticket Update Date])
var _datediff1=
DATEDIFF(
    _Last, _current,MINUTE)
return
IF(
  'Table'[Ticket Resolve Date]=BLANK(),_datediff1,
DATEDIFF(
       [Ticket Update Date],[Ticket Resolve Date],MINUTE))
Total Ticket Duration = SUMX(ALL('Table'),[Duration])

2. Result:

7:20 AM – 9:39 AM The intermediate minutes are 139.

vyangliumsft_0-1681442516887.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @NewBie0322 ,

 

Here are the steps you can follow:

1. Create calculated column.

Duration =
var _current=
MAXX(
    FILTER(ALL('Table'),'Table'[Ticket Number]=EARLIER('Table'[Ticket Number])&&'Table'[Ticket Update Date]=EARLIER('Table'[Ticket Update Date])),[Ticket Update Date])
var _Last=
MAXX(
    FILTER(ALL('Table'),'Table'[Ticket Number]=EARLIER('Table'[Ticket Number])&&'Table'[Ticket Update Date]<EARLIER('Table'[Ticket Update Date])),[Ticket Update Date])
var _datediff1=
DATEDIFF(
    _Last, _current,MINUTE)
return
IF(
  'Table'[Ticket Resolve Date]=BLANK(),_datediff1,
DATEDIFF(
       [Ticket Update Date],[Ticket Resolve Date],MINUTE))
Total Ticket Duration = SUMX(ALL('Table'),[Duration])

2. Result:

7:20 AM – 9:39 AM The intermediate minutes are 139.

vyangliumsft_0-1681442516887.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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.