Set Analysis Exclusion Problem - Finding previous Tier
I have an interesting set analysis exclusion problem with which I am struggling right now. Can someone please help ?
DateId = 0 always gives the current tier for a given payer. For instance: In the attached prototype, Payer 1 has T4/PB/PA as the current tier. In this problem, I would like to find out what the previous tier was for each payer. In determining the previous tier, following conditions must be met:
1. DateId must not be 0 and the search should be conducted in increasing order of DateIds (1, 2, 3 etc.)
2. Previous Tier must not be the same as current tier.
The expression that I am using to get the Previous Tier is: