Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Not applicable
Author

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

qumniusomnius
Contributor III
Contributor III

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?


Not applicable
Author

Yes, actually I need both.

Not applicable
Author

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

qumniusomnius
Contributor III
Contributor III

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