We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

If Conditional statement - 3 fields

Make_It_Raynes
5 - Atom

I would like to write a conditional statement with just three columns.  i imagine this is simple but my newbie skills just aint there yet

 

If any record in field Name has "Outlier" in field Check, all like records in field Name should have "Yes" in field Yes/No.

 

All others should have "No".

 

So, because there are three "Outlier" records for C, all C records 10-12 should then have "Yes" in column 3 (and every instance of A, B, and C below the sample)

Because XXX has no "Outlier" results, all XXX rows should read "No" in column 3

 

coreyraynes_2-1663099733135.png

 

 

4 REPLIES 4
IraWatt
17 - Castor
17 - Castor

Hey @Make_It_Raynes,

Here is one way of doing this:

IraWatt_0-1663100401619.png

 

The Summarize Tool to group each Name and Check value. I then filter to only the Name values which have a Check value Outlier. I then only join on Names with a Check Outlier applying a yes value to them. The ones which did not join i apply No.

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

DataNath
17 - Castor
17 - Castor

Is this what you're after @Make_It_Raynes? This may fail if your [Check] column has other options than 'Outlier' or blank so please let us know if so:

 

DataNath_0-1663100730416.png

FreeRangeDingo
ACE Emeritus
ACE Emeritus

You can do this with a summarize, formula, and a join.  See attached workflow.  The first set of tools used your data set.  In the second set of tools, I expanded the data set a bit to make sure it was doing what I expected.

 

The summarize concatenates all values in the Check column for each name.  The Formula tool looks to see if "Outlier" is contained in that concatenated value.  The join gives a new Yes No column from the Formula. 

Make_It_Raynes
5 - Atom

@DataNath

this worked great, thanks so much...  easy to follow and the results im after ('outlier' or null are the only field results so yes it is good to go)

Labels
Top Solution Authors