Hi there!
I am trying to create a report that includes all data for each subject row in the columns.
Currently, i have information for each subject in two separate reports (see first photo). Since the data has been summed up into SAS Reports I am having a hard time combining the original data. Is there any way i can add the Sum of Debits, Sum of Credits and Balance check from the first table to the right of the second table? Tables 1 and 2 are currently represented in SAS Report.
Table 1 | ||||||
ACCOUNT_NUM_1 | ACCOUNT_NUM_2 | TOTAL SUM | ||||
BATCH_ID_1 | Sum of Transactions | Sum of Transactions | Batch_Total Sum | |||
BATCH_ID_2 | Sum of Transactions | Sum of Transactions | Batch_Total Sum | |||
Table 2 | ||||||
TOTAL_DEBITS | TOTAL_CREDITS | BALANCE | ||||
BATCH_ID_1 | Sum of Debits | Sum of Credits | 0 | |||
BATCH_ID_2 | Sum of Debits | Sum of Credits | 0 | |||
Table 3 (end results) | ||||||
ACCOUNT_NUM_1 | ACCOUNT_NUM_2 | TOTAL_SUM | TOTAL_DEBITS | TOTAL_DEBITS | BALANCE | |
BATCH_ID_1 | Sum of Transactions | Sum of Transactions | Batch_Transactions_Sum | Sum of Debits | Sum of Credits | 0 |
BATCH_ID_2 | Sum of Transactions | Sum of Transactions | Batch_Transactions_Sum | Sum of Debits | Sum of Credits | 0 |
This is one good reason to avoid doing data processing in proc report. Do all yor data processing before reporting it out, then your proc report simply reports a dataset.
You can get sums and such like quite easily using SQL, means/summary procedures, datasteps. Then if you need to, merge data together.
This is one good reason to avoid doing data processing in proc report. Do all yor data processing before reporting it out, then your proc report simply reports a dataset.
You can get sums and such like quite easily using SQL, means/summary procedures, datasteps. Then if you need to, merge data together.
Thanks RW9. I'm trying to do that but having trouble with copying some of the report functionality into SAS Code.
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.