I have a requirement where we need to check if an ID is present in previous 12 month and if ID is not present in previous 12 month then assign them as a flag 1 else 0.
Output will be like below:
Are you looking to do this in the script? Also, why is 201601 for ID 10 = 1?
We do have last 12 months for ID 10 prior to 201601, don't we?
Want to do using expression and ID 10 = 1 because this is appearing after 12 month.