2 weeks ago - last edited 2 weeks ago
i need to handle an if statement based on a variable.
I have Cust and Source and i want PrevSource.
The PrevSource column shows the value of Source of the previous row, which is a lag func in base sas with an if statement than if first.cust then prevSource=Source.
Is it possible in VA to do this?
I want this data
where the IF_STAT column is 1 IF source =B and PrevSource <> B for the same Cust, else 0.
I can't to do this before VA because this IF STAT must change in base of the chosen filter.