BookmarkSubscribeRSS Feed
chenzinc
Calcite | Level 5

I am validating a huge 8000 observations dataset. And there is one column named Brand.

 

what the data shows:

Nike

nikes

nikeshoe

Nike shoe

nike brand

Nike.

 

what i want:

Nike

 

how can I do corrections and group them together? 

6 REPLIES 6
ChrisNZ
Tourmaline | Level 20

How?
You need to define rules and apply them.

You cannot do 2 until you've done 1. 

How do you decide to group these characters strings into the same group? 

chenzinc
Calcite | Level 5
how can I change all the strings name to just only Nike?
Ksharp
Super User
if find(have,'nike','i') then flag='Nike' ;
Ksharp
Super User
Chris,
I don't realize it is a fuzz match problem. Just gave OP a start point .
ChrisNZ
Tourmaline | Level 20

> how can I change all the strings name to just only Nike?

 

Since you make no rules then this code matches your requirements:

if 1 then STRING='Nike';

 

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
  • 6 replies
  • 358 views
  • 3 likes
  • 3 in conversation