BookmarkSubscribeRSS Feed
CamRutherford
Fluorite | Level 6

 Hi,

 

I have an output (FigA) but want it to look like (FigB) - any ideas?

 

(FigA)

YrMthProductTotal
20101D8445
20101R217
20101E7276
20102D322
20102R6845
20102E6508
20103D474
20103R7503
20103E6960
20111D6508
20111R6558
20111E6608
20112D6658
20112R6708
20112E200
20113D250
20113R900
20113E950

 

 

(FigB)

YrProductTotal
2010D9241
 R14565
 E20744
2011D13416
 R14166
 E7758
4 REPLIES 4
Reeza
Super User

Proc REPORT, TABULATE OR FREQ. 

 

I'd probably start with TABULATE. 

CamRutherford
Fluorite | Level 6

Tabulate works but I need it to be in an output file not a table. When I use OUT= it doesn't keep the format of the proc tabulate and instead refers back to original file.

 

 

Reeza
Super User

Given your sample they should be the same structure.

You can try PROC MEANS or FREQ. 

i recommend against including missing values in first column.

ballardw
Super User

If you want this in a data set what is the purpose of the blank values for year?

What will you do with the resulting data set?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 4 replies
  • 973 views
  • 0 likes
  • 3 in conversation