Hi I'm trying a Qlicksense expression to achieve the below
1. Get only the current and one previous enrollment and end date.
2. Compare the current enrollment date and previous end date if previous end date >6months of current enrollment date then flag ID 1 as new else old.
![smanas_0-1677524540429.png smanas_0-1677524540429.png](https://community.qlik.com/t5/image/serverpage/image-id/101476i332920BD56EED3A5/image-size/medium?v=v2&px=400)
In the above example rows the output should show as below as solved by @vinieme12
![smanas_1-1677524675478.png smanas_1-1677524675478.png](https://community.qlik.com/t5/image/serverpage/image-id/101477iC6E9D0A23A2A111C/image-size/medium?v=v2&px=400)
Please advise. Thank you