BookmarkSubscribeRSS Feed
vidya3
Calcite | Level 5
I have attached the document below according to which I'm looking to transpose the dataset, please help as this is quite urgent and I've been struggling with it for quite some time.
4 REPLIES 4
PaigeMiller
Diamond | Level 26

Most of us will not download Microsoft Office documents as they can be a security threat. Better you should provide data as text in your message, following these instructions and examples. This should not be something we have to request repeatedly, you have been asked for data in the proper form before.

 

In the meantime, perhaps the PROC TRANSPOSE documentation and examples will be helpful.

--
Paige Miller
Reeza
Super User
Can you post the code you tried and your data as a data step instead of Excel?

You will need to follow the approach here (Example 3) to transpose multiple variables at once.
ballardw
Super User

You need to very clearly show what your current data set looks like.

Then show and describe the result.

 

I am afraid that a single sheet from a spreadsheet doesn't tell us much about what you have and which the result.

Plus we can't tell SAS variable types or variable names.

 

And anytime reshaping comes up, it often is helpful to answer are your sure you need a data set? Often reports are easier to create than data sets.

vidya3
Calcite | Level 5
Dataset I have:
Value1 value2 date1 date2 range1 range2
1.2 2.3 1/1/24 3/2/24 xyz abc

Dataset I want:
Name label value date range
Value1 *** 1.2 1/1/24 xyz
Value1 *** 2.3 3/2/24 abc

I want the respective label of that field to fetch under label field, please help.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 336 views
  • 0 likes
  • 4 in conversation