- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I want to know what if I don't use by statement in the proc statement and only use id and var statement, what will happen? Please help!
I have a code snippet with me.
If I use "by" statement in proc transpose (code snippet below). Then my output looks likes this
and If i don't include "by" statement, then my output looks like this(which is my desired output)-
So, I have confusion about when to use by statement and when not?
Thank you in advance.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
A BY statement puts results from each level of the BY variable (1, 2, 3 or 4) on its own row. Without the BY statement, results for 1, 2, 3 and 4 are on the same row.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So, I have confusion about when to use by statement and when not?
If you want output that looks like the first table, you use a BY statement. If you want output that looks like the second table, then you don't use a BY 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
A BY statement puts results from each level of the BY variable (1, 2, 3 or 4) on its own row. Without the BY statement, results for 1, 2, 3 and 4 are on the same row.
Paige Miller