Hello,
Need some help with the following situation :
- need to cumulate the amount for variable nocont
but in SAS
I try with summary but doesn't work
| nocont | tip | date | amount |
| A | x | 17-Oct-18 | 2.00 |
| B | y | 17-Oct-18 | 3.00 |
| C | z | 17-Oct-18 | 4.00 |
| A | x | 17-Oct-18 | 100.00 |
| C | z | 17-Oct-18 | 1234.24 |
| C | z | 17-Oct-18 | 34.00 |
| B | y | 17-Oct-18 | 279.00 |
| D | g | 17-Oct-18 | 45.00 |
| E | j | 17-Oct-18 | 38.00 |
| F | k | 17-Oct-18 | 339.00 |
Post test data in the form of a datastep. Show what the output should be from that datastep. Explain (with log if needed) what "doesn't work". From what you post:
proc summary data=have; class nocont; output out=want sum()=; run;
Should work.
Post test data in the form of a datastep. Show what the output should be from that datastep. Explain (with log if needed) what "doesn't work". From what you post:
proc summary data=have; class nocont; output out=want sum()=; run;
Should work.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.