BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
brokenpc1
Fluorite | Level 6

Hi everyone,

 

I am relatively new to using proc report to generate reports. I am now stuck with a report that requires transposing multiple columns and would really appreciate your help.

 

The original dataset I have in SAS is like the following:

brokenpc1_0-1688319088007.png

 

Ideally, I would like to make a report in the following way:

brokenpc1_1-1688319182026.png

If we ignore the format, I have two questions regarding this report:

1. How do I put the vehicle type at the top of sales/cost/profit?

2. How do I group by manager name?

 

Thank you very much for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Use a comma in the COLUMN statement.

column region manager vehicle,(sales cost profit);

REGION and MANAGER are GROUP variables.  Vehicle an ACROSS variable.   

define region / group;
define manager / group;
define vehicle / across;

 

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Use a comma in the COLUMN statement.

column region manager vehicle,(sales cost profit);

REGION and MANAGER are GROUP variables.  Vehicle an ACROSS variable.   

define region / group;
define manager / group;
define vehicle / across;

 

brokenpc1
Fluorite | Level 6

Thank you Tom, this is very helpful. 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 442 views
  • 2 likes
  • 2 in conversation