Alteryx Designer Desktop Discussions

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

If else conditions

Feras95p
8 - Asteroid

Dear all,

 

I have a problem with (else if) when I apply it in the formula,I have as the input file an excel file which contains a column titled by Name and I have several names in this column. I'm applying a formula so that if the name is Sam create a new column by name Sam and put 1 , if the name is Adam do the same and if the name is Adam Sam do the same only put 1 in the column of Adam Sam not other two columns, so any idea on how I can do that?

 

 

Thanks in advance for your kind support.

4 REPLIES 4
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Feras95p ,

 

I think, you have to use a different approach. CONTAINS will return "1" for each entry ("Sam" and "Sam Adam" / "Adam" and "Sam Adam"). What about using IF/ELSEIF/ELSE to create a Header/Value pair and the Crosstab tool to move these pairs to rows? Sound confusing, I've attached a sample workflow. Hope it is helpful.

 

Best,

 

Roland

echuong1
Alteryx Alumni (Retired)

I believe the functionality you're looking for can be achieved with a cross-tab tool. 

 

I'd add a formula tool just to set a value of 1, so when you use the cross-tab tool you can get a count of each name instance with the aggregation.

 

echuong1_0-1583763462897.png

 

Feras95p
8 - Asteroid

Thanks a lot I really appropriate your efforts.  

Feras95p
8 - Asteroid

Thanks

Labels