Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Transform a sequence of lines to an event

Hello all !

I have a table where there is a sequence of events. Knowing a sequence of (events) lines has a meaning, I want as an output a table where each line correspond to the sequence of lines. To explain more what I want, please see the following:

Capture.PNG

Thank you very much !

Best regards,

Yasser.

5 Replies
Highlighted
Not applicable

Re: Transform a sequence of lines to an event

A solution like this one may be suffisant for me where Id is a created field and have its value incremented every time we meet a A event:

Capture.PNG

Highlighted
Contributor III
Contributor III

Re: Transform a sequence of lines to an event

you can try with concat:

let vTemp = CONCAT(EventType,'|')


substringcount(vTemp, 'A|B|C')

substringcount(vTemp, 'C|D')


would get you the number of Ev 1 and Ev 2 events, or do you also need the sequence in which Event type 2 happen?


Highlighted
Not applicable

Re: Transform a sequence of lines to an event

Yes, actually I need both.

Highlighted
Not applicable

Re: Transform a sequence of lines to an event

But if a have :

ABCD it will count ABC and CD. It wil count C in the two sub strings, and I only want it to be counted in the first one

Highlighted
Contributor III
Contributor III

Re: Transform a sequence of lines to an event

you can also do:

load

if(   above(Event Type, 2) = 'A'  and above(Event Type, 1) = 'B'  and Event Type = 'C' ,  'Ev 1',

if( above(Event Type, 1) = 'C' and  Event Type = 'C', 'Ev 2')           as [Event type 2]

resident Input;

this will get messy if there are a lot of event types