INPUT:

Desired OUTPUT:

I am already using a multi- row formula to flag this. But I am having problems with the result I am getting, Instead of the "Desired OUTPUT" mentioned above I am getting this. As you can see the formula works for some vales in the "DecodedValue" column. I don't know why it doesn't work for each change in value.

Multi-row formula being used:
