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-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
  • 4 replies
  • 740 views
  • 0 likes
  • 3 in conversation