Hi folks,
I have a list of policy numbers, the policy version associated with it and whether that policy version had a claim or not. A policy can have multiple policy versions which go in sequential order. You can see from my data below, each row has policy number, policy version and whether that version has had a claim.
What I'm trying to do is for each policy, only keep the policy versions that either have the claim on them and the policy versions after that version. I want to delete the versions of each policy before the version where the claim happened and only keep the policy version on and after the version where the claim occurred.
You can see from the screen shot below, my desired result (the 1 and 0 are arbitrary in terms of labelling) - I would like something like that so I can filter this column by the 0 and delete them. So for each policy I'd like the index to only count 1 on the version that had the claim and any version after that but a 0 for the versions before the claim.
Hopefully that's making sense.
Any ideas?
I have a list of policy numbers, the policy version associated with it and whether that policy version had a claim or not. A policy can have multiple policy versions which go in sequential order. You can see from my data below, each row has policy number, policy version and whether that version has had a claim.
What I'm trying to do is for each policy, only keep the policy versions that either have the claim on them and the policy versions after that version. I want to delete the versions of each policy before the version where the claim happened and only keep the policy version on and after the version where the claim occurred.
You can see from the screen shot below, my desired result (the 1 and 0 are arbitrary in terms of labelling) - I would like something like that so I can filter this column by the 0 and delete them. So for each policy I'd like the index to only count 1 on the version that had the claim and any version after that but a 0 for the versions before the claim.
Hopefully that's making sense.
Any ideas?