I have a dataset with Account Number that can be enrolled in a program. The data-set is monthly data. If it is enrolled the Enrolled_Flag = 1 else it is 0.
An account can only be enrolled at most once. How would I detect data issues with the file?
Account AAAA is okay, enrolled in second month.
Account_Number, Year_Month, Enrolled_Flag
AAAA, 202101, 0
AAAA, 202102,1
AAAA, 202103,1
Account BBBB is okay, enrolled and derollled in 4th month
Account_Number, Year_Month, Enrolled_Flag
1
1
1
0
Account CCC is okay always enrolled
1
1
1
1
Account DDDD is NOT okay, enrolled in 2nd month and then then enrolled in 4th month.
0
1
0
1
1