Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Lookup Multiple Columns of Data

anveshg
6 - Meteoroid

Hello all,

 

I am currently working with CRM Data from a database where the contact data looks as follows.

 

Contact IDContact NameContact GenderContact CountryContact Industry
1A103
2B122
3C212

 

Several attributes in the table are encoded and the lookup data is stored in a different table as follows.

 

Lookup TypeKeyValue
Gender0Other
Gender1Male
Gender2Female
Country0X
Country1Y
Country2Z
Industry0Value1
Industry1Value2
Industry2Value3
Industry3Value4

 

I am trying to extract several contact records from the table and would need to translate around 14 attributes with a lookup table structured as above.  I am currently doing it through a chain of find replaces and joins. However, I am unsure if this is the best way to go forward. 

 

Any ideas to achieve this in a better way?

 

3 REPLIES 3
OllieClarke
15 - Aurora
15 - Aurora

Hi @anveshg you can use the dynamic replace tool to do this

First you'll want to set up your lookup table like this:

OllieClarke_0-1573739470413.png

And then set up the dynamic replace tool like this:

OllieClarke_1-1573739493299.png

Which will then give you this output:

OllieClarke_2-1573739513845.png

I've attached the workflow below. Hope that helps,

 

Ollie

 

benakesh
12 - Quasar

Hi @anveshg ,

With transpose  you can use one  find replace .

benakesh_0-1573739603663.png

 

anveshg
6 - Meteoroid

Thank you! I will give it a run.

Labels