Count number of times 2 actions appear in same transaction

In my sample data I have 4 calls processed. The second and last call disconnects before the transfer is complete and shows TRANSFER followed by END.
I want to count how many times TRANSFER and END occur together in an Identifier.
Thank you for your help.


|80522676|3138675309|MAIN GREETING|

|80522682|2123655555|MAIN GREETING|

|80522689|7276551234|MAIN GREETING|

|80522695|4329871560|MAIN GREETING|

Hi Stapper,

I want to understand more on how this call data is being stored in your dataset. Is each call being represented as one row?

You can look into contains function to define the above logic
i.e. ifelse(contains({column_name}, ‘TRANSFER’) AND contains({column_name}, ‘END’), ‘output_name’, null)

1 Like

Thanks imaitri,
I will look at the “contains” and see if I can make it work.
Each call is represented by the “Idenitifier” and I added an empty line to show each call in this example. The empty line does not exist in the real file.
Thanks for your assistance, I appreciate it.