Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Instead of looking at who the new customers are, I would like to identify which customers have been churned out in the next period. So looking for a function that works opposite to the previous() function.
Hi,
The same previous condition itself can do your requirement
Just check if(previous(Customer)=Customer,'1','0') AS Flag
Here who having 1 the existing customer or they are the new one
Thanks Amutha.
I realized the same.
another variant:
IF(NOT Previous(Customer)=Customer,0,1)
There´s no function to "look ahead" into dataflow to check what would be your next value to a field.
You should rewrite your logic as recommended by Amuthabharathi Subramanian
HI,
try Peek() function.
Best regards.
I'm looking to do something very similar. I have a field called 'FlowDirection'. If the record ahead has a value of 'Backwatrds' I want the field I'm creating to have 'Y' else 'N'. I don't quite see how I can fit this into the logic provided thus far.
Any help would be greatly appreciated.
is it dependent of the current field that is being analysed?
You can do it in 2 steps, first flag the FlowDirection with backwatrds as Yes in Flag 1.
then, reverse the sort order
and then use the Previous function to flag your final flag for this who have yes in Flag 1
Thanks eruditio, that work work spot on.
glad to be of help