BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MatthewDurieux
Calcite | Level 5

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_1ACCOUNT_NUM_2TOTAL SUM   
BATCH_ID_1Sum of TransactionsSum of TransactionsBatch_Total Sum   
BATCH_ID_2Sum of TransactionsSum of TransactionsBatch_Total Sum   
       
Table 2      
 TOTAL_DEBITSTOTAL_CREDITSBALANCE   
BATCH_ID_1Sum of DebitsSum of Credits0   
BATCH_ID_2Sum of DebitsSum of Credits0   
       
       
Table 3 (end results)      
 ACCOUNT_NUM_1ACCOUNT_NUM_2TOTAL_SUMTOTAL_DEBITSTOTAL_DEBITSBALANCE
BATCH_ID_1Sum of TransactionsSum of TransactionsBatch_Transactions_SumSum of DebitsSum of Credits0
BATCH_ID_2Sum of TransactionsSum of TransactionsBatch_Transactions_SumSum of DebitsSum of Credits0
1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

MatthewDurieux
Calcite | Level 5

Thanks RW9. I'm trying to do that but having trouble with copying some of the report functionality into SAS Code.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1237 views
  • 1 like
  • 2 in conversation