Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to count consecutive words in a list to show in a diagram.
So, if on the current line the text is 'Call' and in the above line the same text is in the same column the count needs to be raised by one.
On the selection in the table below the count should be 1.
TimeStamp | CallStatus |
---|---|
12:22:30 | Call |
12:22:00 | Call |
12:20:00 | Connect |
12:19:50 | Call |
I've been trying to get the result by using the 'Above' function. But as soon as i add a Count function, the editor shows an error in the expression.
This is what i've come up with:
Count (If (If (CallStatus = 'Call', 1, 0) * If (Above (CallStatus, 1, 1) = 'Call', 1, 0), 1, 0))
Anyone got an idea how to solve this ?
Regards,
Gerko Klooster
Maybe you can do this in script. Sort the table by timestamp and use peek to look at the CallStatus of the previous record. Create a new field (CallFlag) and set it to 1 if current callstatus is Call and previous callstatus is Call. Then count the CallFlags.
you can try using the peek function to find out the previous value of the column.
Count (If (CallStatus = peek('CallStatus') AND CallStatus= 'Call', 1, 0))