Alteryx Designer Desktop Discussions

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

Create multiple data description fields

ms_315
5 - Atom

Hi everyone,

 

I have a dataset which contains 50 columns of data and 1M+ rows. I need to add field descriptions into the dataset, but i can't think of an efficient way of doing it.

 

Here is some example data. My data itself looks a bit like this:

 

NATIONALITYPRODUCTREGIONSATISFACTION
TH01NE01
MO02N03
IT04E05
TH05C02
CH02W02
MO03S02
FR03NW05
GB05O04
IT04SW01
GB06SE03
FR06UNK04
CH01NE04

 

And my label lookup file looks like this:

 

FIELD_NAMEDATALABEL
NATIONALITYGBGREAT BRITAIN
NATIONALITYMOMOROCCO
NATIONALITYITITALY
NATIONALITYFRFRANCE
NATIONALITYTHTHAILAND
NATIONALITYCHCHINA
PRODUCT01BAR-Z
PRODUCT02BAR-Y
PRODUCT03LEVER-X
PRODUCT04LEVER-A
PRODUCT05LEVER-C
PRODUCT06LEVER-G
REGIONNNORTH
REGIONNWNORTH WEST
REGIONNENORTH EAST
REGIONCCENTRAL
REGIONEEAST
REGIONWWEST
REGIONSSOUTH
REGIONSESOUTH EAST
REGIONSWSOUTH WEST
REGIONOOFFSHORE
REGIONUNKUNKNOWN
SATISFACTION01VERY LOW
SATISFACTION02LOW
SATISFACTION03MEDIUM
SATISFACTION04HIGH
SATISFACTION05VERY HIGH

 

And i'd like to end up with something that looks like this, the original dataset with label fields added in: 

 

NATIONALITYNATIONALITY_LABELPRODUCTPRODUCT_LABELREGIONREGION_LABELSATISFACTIONSATISFACTION_LABEL
THTHAILAND01BAR-ZNENORTH EAST01VERY LOW
MOMOROCCO02BAR-YNNORTH03MEDIUM
ITITALY04LEVER-AEEAST05VERY HIGH
THTHAILAND05LEVER-CCCENTRAL02LOW
CHCHINA02BAR-YWWEST02LOW
MOMOROCCO03LEVER-XSSOUTH02LOW
FRFRANCE03LEVER-XNWNORTH WEST05VERY HIGH
GBGREAT BRITAIN05LEVER-COOFFSHORE04HIGH
ITITALY04LEVER-ASWSOUTH WEST01VERY LOW
GBGREAT BRITAIN06LEVER-GSESOUTH EAST03MEDIUM
FRFRANCE06LEVER-GUNKUNKNOWN04HIGH
CHCHINA01BAR-ZNENORTH EAST04HIGH

 

Some of the data has a different label in different fields, e.g. "01" gets a different label in the "product" and "satisfaction" fields. The best solution i can currently think of is to create a separate label lookup file for each field name and then use joins to bring in the labels for each field.

 

I'm hoping that someone can provide a more efficient solution, and i'd be really grateful to anyone who can!

 

Thank you!

Matt

2 REPLIES 2
afv2688
16 - Nebula
16 - Nebula

Hello @ms_315,

 

How about this:

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

ms_315
5 - Atom

Thank you @afv2688  for the solution!

Labels