BookmarkSubscribeRSS Feed
gabriel_k
Obsidian | Level 7

Hello, use a proc tabulate for summary table creation. Have years in column headers.  

 

                   Year1         Year2         Year3

Modality1

Modality2

Modality2

Total

 

Is there a way to add columns, showing evolution in % from year to year with proc tabulate or any other ? 

 

 

1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
Proc TABULATE will build each column isolated from the other columns. So you cannot, in TABULATE, divide Year3 by Year2 (as an example) or subtract Year2 from Year3 to find a difference (as another example). You can do things like that with PROC REPORT and a COMPUTE block or a COMPUTED report item. Or, you can pre-summarize your data and calc your % differences in a program and then just arrange everything the way you want and do a simple PROC PRINT, but based on the information you've given, TABULATE won't do what you describe.
cynthia

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 1232 views
  • 0 likes
  • 2 in conversation