Is there a way to use the tabulate procedure to calculate a value other than one of the default statistics? I would like to calculate the change from the base year. Ideally I would like to calculate some values after the all line.
One way to do this is to create a second table and prefill the second table with summary data from the data layer, however the solution is not a clean as calculating inside of SAS.
I would like to create something like this.
|% Growth Over Prior Year||2.80%||0.20%|
|Cumulative Growth Since base year||2.80%||3.10%|
TABULATE does not allow you to compute your own (extra) summary lines at the bottom of the report. ALL is what produces the summary line that you show as TOTAL and the other 2 lines would not normally be possible with TABULATE unless you faked out the data and made your own "extra" observations. PROC REPORT is more flexible and more powerful in allowing you to customize and add extra break lines to the report. As Jaap explained, it is the perfect job for a COMPUTE block.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.