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';

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1254 views
  • 3 likes
  • 3 in conversation