Alteryx Designer Desktop Discussions

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

How to combine 3 columns and find possible combinations

Jetblue
5 - Atom

I need to create a category list in one column.

Each column / category is listed as True or False ( I have 3 categories)

Some rows could be True for all 3 categories, while some could be only one category or neither. I was wondering if I could create a combination for each. See example below, the column for "new category" is the results I am trying to get.

 

REDYellowGreenNew category   
FalseFalseFalseNeither   
TrueFalseFalseRED   
TrueTrueFalseREDYELLOW   
TrueTrueTrueALL   
       
       
       
2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @Jetblue 

 

Here's how I would do this. I chose not to do the long if statement approach and instead tranpose the data to check for true values in each record and apply the logic from there. This would work for any number of columns.

 

Luke_C_0-1657735909409.png

 

 

flying008
15 - Aurora

Hi,@Jetblue 

 

The other way to dynamic resolve with simple formula.

 

IF IsEmpty(ReplaceChar([New category], "-,","")) THEN 'Neither' 
ELSEIF Right([New category], 1)='-' THEN ReplaceChar([New category], "-,","") 
ELSE 'ALL' ENDIF

 

录制_2022_07_14_09_39_06_988.gif

Labels
Top Solution Authors