Hi SAS coders,
I am having trouble with this code:
It gives me an error that says:
@kcvaldez98 wrote:
ERROR: There is more than one statistic associatedwith the column defined by the following elements.
You can only have one statistic per variable in a DEFINE statement. You can't request two (or more) statistics per variable in a single DEFINE statement.
In PROC REPORT, you can use an ALIAS to get multiple statistics for a single original variable. See this example:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n0ldy84v9j7463n1jjkloe7av38c.htm
@kcvaldez98 wrote:
ERROR: There is more than one statistic associatedwith the column defined by the following elements.
You can only have one statistic per variable in a DEFINE statement. You can't request two (or more) statistics per variable in a single DEFINE statement.
In PROC REPORT, you can use an ALIAS to get multiple statistics for a single original variable. See this example:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n0ldy84v9j7463n1jjkloe7av38c.htm
Thank you for helping me with that.
I followed that SAS documentation, but I ran into some things I need help with.
MY code is this:
you have to put the variable for the means into the COLUMN statement.
Follow the example shown in the link I gave.
There, there is a variable name (and in the DEFINE statement the statistic SUM is specified), followed by two aliases, one for statistic MIN and one for statistic MAX.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.