Alteryx Designer Desktop Discussions

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

Find Replace or Join | Multi - variable vlookup

lamprechtN
6 - Meteoroid

Hello!

Apologies if this has been asked before and/or this has a simple answer - I am relatively new to the platform and the community. 

 

I have a set of data that I need to run a set of if statements on, but are in seperate tables.  In one table (Table A below), I have the supplier data and the API Data side by side.  However, I need to clean this data up using the look up table (Table B), to decide whether the "cleaned version" is the supplier or API data.

 

In essense, I want to run test to see if the supplier data (table A) matches a value in the supplier column (Table B).  If it does, then I want to test to see if the API data can provide any additional information on that line item.  If so, then use that as the cleaned out-put.  If not, then use the Default value in the Cleaned -out column.

 

(example of Data) Table A:

Supplier DataAPI DataCountCLEANED OUTPUT (Post Alteryx workflow)
Metal 1Metal
Metal 10MMMetal - Bronze , 10MM2Metal - Bronze
Metal - SilverSilver3Metal - Silver

 

Table B:

Supplier Data Entry ** ContainsAPI Data Check ** ContainsCleaned Version
MetalMetal - SilverMetal - Silver
MetalMetal - BronzeMetal - Bronze
Metal Metal

 

** If it helps at all, this is how I think I would write it in SQL using an if statement and the two different tables:

select

B.cleaned_version, A.Count

from tablea as A

left join tableb as B

where b.supplierdata in a.supplierdata

    and (if b.APIDataCheck in A.API then b.APIDataCheck

                   elseif B.APIDataCheck ="") in  A.API

 

 

1 REPLY 1
JohnJPS
15 - Aurora

Hi @lamprechtN,

 

I might be able to get close to what you're after by using two Find/Replace tools one after the other, followed by a formula to clean up the findings a bit. It sounds like you're looking for "metal" in one step, and looking for a type of metal in the next step.  I utilized that in the attached example to produce results similar to your example.

 

Hope that helps!

John

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels