- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi SAS coders,
I am having trouble with this code:
It gives me an error that says:
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
you have to put the variable for the means into the COLUMN statement.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Paige Miller