Hi All
please find the attached.
I need an output like
TOTAL A =All Total-Total B.
by using proc report only please.
Thanks,
Sathya.
Some of us refuse to download and open .xlsx (and other MS Office) documents because they can be a security threat.
Please show us your data in the form of SAS data set Code as described here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
Thanks,
name | a1 | T1 | % | b1 | T2 | % |
A | 227 | 374 | 61.00% | 9743 | 112320 | 9.00% |
B | 34 | 77 | 44.00% | 1452 | 24549 | 6.00% |
C | 198 | 399 | 50.00% | 15317 | 128478 | 12.00% |
D | 305 | 519 | 59.00% | 14837 | 141396 | 10.00% |
E | 220 | 380 | 58.00% | 10008 | 121995 | 8.00% |
Total A | 984 | 0 | 0 | 51357 | 0 | 0 |
Total B | 751 | 2236 | 34.00% | 282376 | 329014 | 86.00% |
All Total | 1735 | 3985 | 44.00% | 333733 | 857752 | 39.00% |
How can insert new row to the report by using Proc report. or how to insert values in existing row
Thanks,
SS
How did you get this table? Show us the code.
If we knew the answer to how you created this table, we could tell you the best way to do this (which may not be PROC REPORT).
Google search: sas proc report add total row
Quite a few results. Show what code you have tried.
1. Show the code you are currently using. Having to guess at variable names and the role any of the variables might have such as group, display or analysis means some suggestions may not work.
It might be possible to create a multilabel format for what ever variable is represented in your "name" column but it is not obvious which "names" might constitute "Total B" or "Total A" , which is a very poor way to reference things since you have specific values of A and B shown as well.
The online documentation for Proc Report shows an example that does something similar in result to what you want.
Note that the order of definition of statements in a multilabel format can change the order of appearance in the output.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.