Hi SAS community,
I need help turning this logic into a program. I am trying to count the number of visits (with the variable Count) based on unique dates. This is what my data looks like.
Dataset
data dsn;
input PID $ Date $ Place Provider;
datalines;
001 10/10/2019 11 456
001 10/11/2019 11 400
001 10/11/2019 11 400
001 10/12/2019 11 509
;
run;
I would want an accumulating variable (Count) in my output like this;
PID Date Place Provider Count
001 10/10/2019 11 456 1
001 10/11/2019 11 400 2
001 10/11/2019 11 400 2
001 10/12/2019 11 509 3
Thank you.