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!
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!
Tom
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...
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.