Hello, I'm looking to create a flag for members who have 2 or more different codes within the span of 30 days and the same location. There are 4 possible codes a member (24, 25, 26, 27) can have and they can have the same code more than once. Here's and example of the data and the flag I would like to create:
Memberid date locationid code
1 03Feb2022 12 24
1 24Feb2022 12 24
1 28Mar2022 13 24
2 03Feb2022 13 24
2 24Feb2022 13 25
3 03Feb2022 12 24
3 24Feb2022 13 26
output data:
Memberid Flag
1 0
2 1
3 0
... View more