Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
raZor
Contributor III
Contributor III

how to identify action taken according to the fields value?

Hello Qlikers,

 

i want an expression that can give me a result like "Result from Expression" field shown below-

ticketaction

result from expression

 

aaction1 
aforwardresponse start
aaction2 
aforwardresolution start
aaction3 
aaction1 
baction2 
bforwardresponse start
bforwardresolution start
bclosed 

 

the idea is that, i want to get the "response start" and "resolution start" according to the keyword 'forward" for every ticket's action .

 

Labels (3)
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi

try like this:

NoConcatenate
OUTPUT:
LOAD *,
If(action='forward',If(Previous(action)='forward','resolution start','response start'),'') as new_field
Resident ...
Order By
ticket,
action
;

View solution in original post

5 Replies
premvihari
Partner - Creator
Partner - Creator

Hi, 

Please try 

if(action = 'forward' and peek(id)=id, 'resolution started','response started') 

raZor
Contributor III
Contributor III
Author

thanks a lot for the reply,

i am unable to find the desired result, please see what i am getting as a result by applying your suggested expression.

 
 
raZor
Contributor III
Contributor III
Author

Capture.PNG

raZor
Contributor III
Contributor III
Author

if the 'forward' comes first time for a distinct ticket then that should be "resolution start"

if the 'forward' comes for second time them that should be "response time" for that distinct ticket .

StarinieriG
Partner - Specialist
Partner - Specialist

Hi

try like this:

NoConcatenate
OUTPUT:
LOAD *,
If(action='forward',If(Previous(action)='forward','resolution start','response start'),'') as new_field
Resident ...
Order By
ticket,
action
;