Forum Discussion
Decomposition tree stage value reference
- 1 year ago
Hi Sriku,
Thank you for the clarification.Based on your updated requirement, calculating the time it takes for a ticket to move from one stage to the next. I’ve revised the approach accordingly.
I’ve added two new calculated columns:
- Previous Update Timestamp
This finds the timestamp of the previous stage within the same ticket.
Previous Update Timestamp = VAR CurrentIndex = 'Tickets'[Ticket Indexing] VAR CurrentTicket = 'Tickets'[Ticket ID] RETURN CALCULATE( MAX('Tickets'[Update - Timestamp]), FILTER( 'Tickets', 'Tickets'[Ticket ID] = CurrentTicket && 'Tickets'[Ticket Indexing] = CurrentIndex - 1 ) )- Time Between Stages (Hours)
This calculates the duration between the current and previous stage transitions.
Time Between Stages (Hours) = VAR PrevTime = 'Tickets'[Previous Update Timestamp] VAR CurrTime = 'Tickets'[Update - Timestamp] RETURN IF( NOT ISBLANK(PrevTime), DATEDIFF(PrevTime, CurrTime, HOUR) )I’ve also attached an updated .pbix file for your reference. Please feel free to test it.
I trust this information proves useful. If it does, kindly “Accept as solution” and give it a 'Kudos' to help others locate it easily.
Thank you.
Hi Sriku,
Thank you for the clarification.
Based on your updated requirement, calculating the time it takes for a ticket to move from one stage to the next. I’ve revised the approach accordingly.
I’ve added two new calculated columns:
- Previous Update Timestamp
This finds the timestamp of the previous stage within the same ticket.
Previous Update Timestamp =
VAR CurrentIndex = 'Tickets'[Ticket Indexing]
VAR CurrentTicket = 'Tickets'[Ticket ID]
RETURN
CALCULATE(
MAX('Tickets'[Update - Timestamp]),
FILTER(
'Tickets',
'Tickets'[Ticket ID] = CurrentTicket &&
'Tickets'[Ticket Indexing] = CurrentIndex - 1
)
)
- Time Between Stages (Hours)
This calculates the duration between the current and previous stage transitions.
Time Between Stages (Hours) =
VAR PrevTime = 'Tickets'[Previous Update Timestamp]
VAR CurrTime = 'Tickets'[Update - Timestamp]
RETURN
IF(
NOT ISBLANK(PrevTime),
DATEDIFF(PrevTime, CurrTime, HOUR)
)
I’ve also attached an updated .pbix file for your reference. Please feel free to test it.
I trust this information proves useful. If it does, kindly “Accept as solution” and give it a 'Kudos' to help others locate it easily.
Thank you.
v-ssriganesh , Thanks for your response. Let me try it out