The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Ticket duration by group Help please Would like to get some guidance to create DAX formula for ticket duration between groups.
Solved! Go to Solution.
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.
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
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.
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
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |