Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

Hi, 

Please try 

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

Highlighted
Contributor III
Contributor III

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.

 
 
Highlighted
Contributor III
Contributor III

Capture.PNG

Highlighted
Contributor III
Contributor III

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 .

Highlighted
Partner
Partner

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