Forum Discussion
Anonymous
7 years agoNot applicable
EARLIER chalenge
Hello Power friends, I have a table with IT tickets like that: Id_ticket, date, old_status, new_status,days_to_fix 100,01/01/2018,<blank>,"new ticket" ,0 // user report a problem opening a tick...
- 7 years ago
Greg gave you the basic construct, and link explaining the concept.
You'll just need to change RETURN portion to only return result when [new_status]="fixed".
So...
Column = VAR __max = MAXX ( FILTER ( ALL ( 'Table' ), [Id_ticket] = EARLIER ( [Id_ticket] ) && [date] < EARLIER ( [date] ) && [new_status] = EARLIER ( [old_status] ) ), [date] ) RETURN IF ( [new_status] = "fixed", [date] - __max, 0 )Result
Anonymous
7 years agoNot applicable
Thanks for your time Greg_Deckler, but, unfortunately, it didn't worked as expected. If you could check, I´ll be thankfull.
The new collum had a unknown value in the first line (the new ticket) and in the 2nd "working" line.
Thanks.
Chihiro
7 years agoSolution Sage
Greg gave you the basic construct, and link explaining the concept.
You'll just need to change RETURN portion to only return result when [new_status]="fixed".
So...
Column =
VAR __max =
MAXX (
FILTER (
ALL ( 'Table' ),
[Id_ticket] = EARLIER ( [Id_ticket] )
&& [date] < EARLIER ( [date] )
&& [new_status] = EARLIER ( [old_status] )
),
[date]
)
RETURN
IF ( [new_status] = "fixed", [date] - __max, 0 )Result