03-21-2014 03:37 PM
Hello EG Users,
How can one store value that represents distinct rows of a variable in dataset into macro?
I would like to count distinct values for Week, which is 3 in this case and store it in macro Week_Distinct.
I would appreciate your instructions on how to achieve that?
03-22-2014 03:27 PM
correct sql should be:
input Week Activity :$;
proc sql ;
select count(distinct week) into :week_distinct from have;
238 %put &week_distinct;