Perhaps this is a minor complaint, but I often find myself changing the names of columns after I set a summary method. Is there a way to prevent the column name from changing from COLUMN_NAME to SUM_of_COLUMN_NAME?
While I believe I have thouroughly searched through the setting, I hold on to hope that I have overlooked it.
Thanks,
Ryan
Query builder is straight forward, when summarizing you have a field that says Column Name that you can type whatever you want into it, as long as it's a valid name. I don't think there's a default way to specify it to stay the same variable.
The code override is relatively straightforward, as long as you're only calculating one statistic (ie mean/sum) it automatically saves with the same name. You do have to list the variables but you can use variable shortcuts.
proc means data=sashelp.class noprint;
var age weight height;
output out=want mean=;
run;
Which Task exactly are you using?
I'm not sure there's a point and click mechanism, but I know for certain you can override this with code.
You'll find EG will get you there 90%, the remaining 10% is code 🙂
Query builder is straight forward, when summarizing you have a field that says Column Name that you can type whatever you want into it, as long as it's a valid name. I don't think there's a default way to specify it to stay the same variable.
The code override is relatively straightforward, as long as you're only calculating one statistic (ie mean/sum) it automatically saves with the same name. You do have to list the variables but you can use variable shortcuts.
proc means data=sashelp.class noprint;
var age weight height;
output out=want mean=;
run;
Fantastic, that takes 50 lines of PROC SQL down to 5 lines of PROC MEANS.
I was not aware of variable lists, they work perfectly in this scenario.
Thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.