In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

boolean column creation based on string extract from a column

shikhar6339
7 - Meteor

Hi,

 

I have a column where each record have multiple people's name. E.g.: I have 6 people - ABC, DEF, GHI, JKL, MNO, PQR.

 

Now I want to create 6 columns with 1 or 0 values with each person's name whether the first column has his her name.

 

in the table below, I have only 1 column: Name. I want to create remaining columns with 1/0 values.

 

Nameis ABCis DEFis GHIis JKLis MNOis PQR
ABC GHI JKL101100
DEF MNO GHI011010
PQR ABC JKL100101
DEF JKL010100
DEF GHI ABC JKL111100

 

 

Really appreciate your help.

3 REPLIES 3
binu_acs
21 - Polaris

@shikhar6339 

One way of doing this

image.png

shikhar6339
7 - Meteor

Hi,

Thank you for your suggestion. I was working on it and found another way in which I'll only have to use 1 formula tool and create 6 formulas like: if Contains([Name], "ABC") then 1 else 0 endif

nagakavyasri
12 - Quasar

@shikhar6339 Try this instead of creating multiple formulas:

 

Screenshot 2024-03-08 143631.png

Labels
Top Solution Authors