09-17-2017 02:38 PM
Hi, this i my first post, so here goes..
I'm trying to sum a column based on the DistinctID of the different column where the value should only me visible on one of the rows (see attachment)
I want to do this for several columns but I cant figure out how to do it.
I have attached the current dataset and how the data should look like.
Any help would be appriciated!
09-17-2017 02:54 PM
Lots of people on this forum will help you out, but most of us won't open Excel files because of malware and corporate policies. See the posts for new users, there are different ways to present your data to let us work with it easily.
Welcome to SAS!
09-17-2017 03:04 PM
Do it one ID as a time with something like this:
proc sort data=have; by id_01; run; data want_01; set have; by id_01; if not last.id_01 then do; number_01 = 0; end; run;
resort want_01 by id_02 and generate want_02, and so on...