ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
dkanand86
Calcite | Level 5

Hi All,

Please can you provide generic sas code for following:

1. Computing Percentage and Percentiles for specific variables

2. Compute Total Sum and Cumulative Sum for specific variables

3. Creating Indicator variable for non-missing values.

Thank you!

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  What code or procedures have you tried? What does your data look like? PROC FREQ will calculate percentages, but so will PROC TABULATE and PROC REPORT. You can get PERCENTILES from several procedures. Many people use PROC UNIVARIATE. To create an indicator variable for non-missing values, you most likely will need a DATA step program and/or a user-defined format....it sort of depends on your data and what you want the new variable to be named and the name of the variable you want to test for non-missing values. For computing Total sums, again, PROC PRINT, PROC MEANS, PROC REPORT, PROC TABULATE, PROC SQL will all work. For computing cumulative sums, however, you will need either a DATA step program or PROC REPORT.

cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 1915 views
  • 0 likes
  • 2 in conversation