BookmarkSubscribeRSS Feed
Grandhi4
Calcite | Level 5

Hi,

If i have a data set like this...

Country               Color               Engaged                    Entry_Code

India                    Blue               4                                   9

UK                      red                 7                                   7

USA                    pink               1                                   8

Canada               Brown             2                                   6

India                    Blue               6                                   4

UK                      red                 3                                   2

USA                    pink               8                                   3

India                    Blue               4                                   9

UK                      red                 7                                   7

USA                    pink               1                                   8

Canada               Brown             2                                   6

India                    Blue               6                                   4

UK                      red                 3                                   2

USA                    pink               8                                   3

Canada               Brown             0                                   1

Canada               Brown             0                                   0

India                    Blue               4                                   9

UK                      red                 7                                   0

USA                    pink               1                                   8

Canada               Brown             2                                   0

India                    Blue               6                                   4

UK                      red                 3                                   2

USA                    pink               8                                   0

Canada               Brown             0                                   1

I need a variables  like this    Country        India      USA      UK      Canada        Color          Engaged          Entry_Code

(Under India variable all India records should be there similarly USA, UK, CN,.....)

If any once know the logic please help me how to do in SAS DI....ASAP

Thanks in Advance  Smiley Happy

Suresh

2 REPLIES 2
Dorota_Jarosz
Obsidian | Level 7

This is impossible, because color, engaged and entry_code have different values for each row or country entry. Which values would you like to put in the columns India, USA, UK, etc.? pLease rearrange the data in the way you need them.

ballardw
Super User

You should provide an example of what your output would look like for at least a couple of rows.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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