Help using Base SAS procedures

inserting values in rows by using proc report

Reply
Frequent Contributor
Posts: 76

inserting values in rows by using proc report

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.

Respected Advisor
Posts: 2,989

Re: inserting values in rows by using proc report

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
Frequent Contributor
Posts: 76

Re: inserting values in rows by using proc report

Posted in reply to PaigeMiller

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

Respected Advisor
Posts: 2,989

Re: inserting values in rows by using proc report

 

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
Super User
Super User
Posts: 9,599

Re: inserting values in rows by using proc report

Google search: sas proc report add total row

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

Super User
Posts: 13,508

Re: inserting values in rows by using proc report

[ Edited ]

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.

Ask a Question
Discussion stats
  • 5 replies
  • 118 views
  • 0 likes
  • 4 in conversation