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