Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF THEN formula using two columns

dattina2287
8 - Asteroid

hi,

 

i am trying to get a workflow to recognize and process two different situations that involve two different columns. 

 

1) If Parent Entry Key has Expense Type "Gift" AND "Fees" then only want to see data for "Gift" 

 

however 

2) If Parent Entry Key ONLY has "Fees" as an Expense Type then want to use this Fees data in the workflow the same way the above data is being kept

 

Is anyone able to help provide a solution? THANKS!

 

dattina2287_0-1686767680150.png\

 

 

 

3 REPLIES 3
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@dattina2287 
If parent entry key has expense type "Gift" AND "Fees", I'd use the summarize tool to aggregate and concatenate. This will allow you to see if the Parent Entry Key contains your criteria:

BS_THE_ANALYST_0-1686768105473.png


Here we can see Parent Entry Key contains both Gift AND Fees - as you mentioned above (but now it's in one row - easy for filtering later).

Next step: Join back to the original data set with the aggregated info. Essentially appending the info ready to filter the rows:

BS_THE_ANALYST_1-1686768194479.png



Now we can apply formula to create the flag for filtering:

BS_THE_ANALYST_3-1686768791540.png

 


Finally:

BS_THE_ANALYST_4-1686768815605.png

 

Lastly, I added an extra line in. Not sure how you treat Parent Entry Key which has expense type just as a gift? You can edit the formula to account for that though, I put a placeholder in there.

All the best,
BS

 

All the best,
BS

LinkedIN

Bulien
binuacs
21 - Polaris

@dattina2287 One way of doing this with the sample tool

binuacs_0-1686768943452.png

 

Luke_C
17 - Castor
17 - Castor

Hi @dattina2287 

 

Probably a few ways to do this. I opted to concatenate the expense type values and drive the logic off of that:

Luke_C_0-1686769179808.png

 

 

Labels
Top Solution Authors