BookmarkSubscribeRSS Feed
sathya66
Barite | Level 11

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.

5 REPLIES 5
PaigeMiller
Diamond | Level 26

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...

--
Paige Miller
sathya66
Barite | Level 11

Thanks,

namea1T1% b1T2%
A22737461.00%97431123209.00%
B347744.00%1452245496.00%
C19839950.00%1531712847812.00%
D30551959.00%1483714139610.00%
E22038058.00%100081219958.00%
Total A984005135700
Total B751223634.00%28237632901486.00%
All Total1735398544.00%33373385775239.00%

 

How can insert new row to the report by using Proc report. or how to insert values in existing row

Thanks,

SS

PaigeMiller
Diamond | Level 26

 

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).

 

--
Paige Miller
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Google search: sas proc report add total row

Quite a few results.  Show what code you have tried.

ballardw
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 822 views
  • 0 likes
  • 4 in conversation