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 Data | API Data | Count | CLEANED OUTPUT (Post Alteryx workflow) |
Metal | 1 | Metal | |
Metal 10MM | Metal - Bronze , 10MM | 2 | Metal - Bronze |
Metal - Silver | Silver | 3 | Metal - Silver |
Table B:
Supplier Data Entry ** Contains | API Data Check ** Contains | Cleaned Version |
Metal | Metal - Silver | Metal - Silver |
Metal | Metal - Bronze | Metal - 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
Solved! Go to Solution.
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