Hi all,
I have a data set with debt_code, icustomerid, datekey and flag. I want to count the debt_code with unique datekey. This is to check how many times that debt_code has entered in same icustomerid. I am not sure how to write a code for it. I am looking to add a column which can show me how many times a particular debt_code has entered same icustomerid on different dates. For e,g, 266208776 has entered 21436 icustomerid 4 times on different dates (datekey). Can anyone assist what would be the best way to find it out?
Sample data.
debt_code icustomerid datekey flag
286338454 16418 20220406 0
295191266 16418 20220406 0
299889733 16418 20220406 0
266208776 21436 20190207 1
266208776 21436 20190911 1
266208776 21436 20200109 1
266208776 21436 20201207 1
291458610 21436 20190911 1
291458610 21436 20190917 1
291458610 21436 20200109 1
291458610 21436 20201207 1