Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Create new column grouping data from previous column

ArminL
7 - Meteor

Hi Community,

 

my problem is as follows:

 

I want to create a new column, which groups several strings from a previous column. I guess it works somehow with a nice IF... formula, but since I'm pretty new to alteryx i can't come up with the right one.

 

GenreGenre Group

R&B

Urban
Hip/HopUrban
RapUrban
Hard-RockRock
MetalRock
Soft-RockRock
  

 

See this table as an example. I simply want to create the new column "Genre Group" based on the column "Genre". I'm sure its really basic stuff, just want to take a short cut here with your help :)

 

Thanks in advance

2 REPLIES 2
cmcclellan
13 - Pulsar

I'd use a Formula tool and use the SWITCH function :

 

SWITCH([Genre],[Genre],

"R&B", "Urban",

"Hip/Hop","Urban",

"Rap","Urban",

"Hard-Rock","Rock",

"Metal","Rock",

"Soft-Rock","Rock"
)

 

You can easily add rows as you go :)

danrh
13 - Pulsar

You could also use a Text Input with a Join.  It creates a nice list where you simple enter what genre drops into what group.

 

image.png

Labels