Alteryx Designer Desktop Discussions

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

If statement with Vlookup

Alayna
8 - Asteroid

Hi, I'm a beginner using Alteryx and need help figuring out how to replicate a formula in my Excel sheet through Alteryx. Basically, I'm using a vlookup to find a SKU value in a different file, and use an if statement to put "Yes" as a match or "No" if there's no match or NaN. I've attached sample data below. I know I need to use either the Join or Union (or both?) tool and possibly the formula tool for the If statement? Any help is appreciated, thank you

5 REPLIES 5
ChrisTX
15 - Aurora

Welcome to the Community.  On the left under Academy > Interactive Lessons, there are some nice Excel lessons in the section Alteryx for Excel Users.

 

Use the Join like you mentioned.

 

Out of the J anchor, use a Formula tool to create a new field for Matched, data type Boolean.

Formula:

  IF [SKU in 2nd file] = "NaN" THEN 0    (zero means No or False)

  ELSE 1    (1 means Yes or True)

  ENDIF

 

out of the Left anchor, use a Formula tool to create a new field for Matched, data type Boolean.  Formula:  0

 

then feed the output from both Formula tools into a Union tool.

 

Chris

Alayna
8 - Asteroid

Thank you for the help and guidance!

Qiu
20 - Arcturus
20 - Arcturus

@Alayna 
Just as you have mentioned, a joint tool can do the work.

And we can also try to use Find and Replace.

But I am having difficulty to understand your input and output based on the logic you gave.

1106-Alayna.PNG

Alayna
8 - Asteroid

Thanks for your reply Qiu. I didn't explain that well but Chris's answer helped me out. I will also look into find and replace

Matt_Hinkle
7 - Meteor

@Alayna 

 

Looks like you already got the input you need, but attached a workflow for you if that helps.

 

Matt

Labels