BookmarkSubscribeRSS Feed
omega1983
Calcite | Level 5

I have enclosed a spreadsheet example of desired output.  I have a column of data that needs to have header names added and summarized.  I am trying to determine the best way to do this.

It involves assigning variable names and using in the summary report.  The totals have already been calculated.  See enclosed

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  I'm curious why you asked about PROC SUMMARY and if it would help you. If you have already summarized your data, where does PROC SUMMARY come into the picture? Is that what you used to summarize the data?

  What code have you tried? What does your input data look like?

  Your spreadsheet had several sections...which rows/columns represent the input data? What is the row for 'NOTH'? Why do you have 2 sections for MSB, one with numbers and another with zeroes? It is hard to make constructive recommendations without enough information.

cynthia

omega1983
Calcite | Level 5

Here is the datastep

data Status(keep=Investor Comp_Ratio Sales Returns Goal);

set Status1;

run;

I want to display a report tab that will show Investor as a header

I want to do a variable named Categories and Performance and show the already assigned Goal

Categories would show sales and returns as rows and the Performance as the Column, along with Goal

Comp_Ratio would show as a row at the bottom of each header.

It looks like a proc transpose however I think I need to know how to handle Categories and Performance

Cynthia_sas
SAS Super FREQ

Hi:

  But that doesn't show what is in Status1. What does the data in Status1 look like? How is it created -- do you use a procedure to create STATUS1? It is in the WORK library. How does it get there? It looks like your DATA step program is only being used to keep the 4 variables. You didn't answer my question about what is row for "NOTH" in your example? Since you need both comma formats and percent signs in the Performance column, that is an argument for PROC  REPORT for the final report. But there are still too many unknowns for the report code, when the data manipulation is still not resolved.

cynthia.

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1215 views
  • 0 likes
  • 2 in conversation