Alteryx Designer Desktop Discussions

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

Help identifying correct data fields

jamesgough
7 - Meteor

Hello. I'm very new to Alteryx so apologies if this is a basic question but it has really stumped me.

 

Say I have 3 fields: X, Y and Z with votes for/against in each of them. However, the 3 fields are ordered randomly in each document so sometimes they will be X, Y and Z, sometimes Z, X, Y etc. I want to identify and label each field for future analysis.  There is an identifier for the field (i.e. X, Y and Z) but at different rows of the document. So I cannot assume a certain row or reference a particular row.

 

What I'm looking for is a way to say in a function "if any row of this column contains X then name this column "X", if not search entire column for Y and if yes then name column "Y", etc."

 

Sort of like the contains formula but extended for the entire field.

 

In my workflow, I want to identify the fields which contain "Mgmt Rec", "Vote Instruction" and ""Proponent". These are in different orders and whilst I usually use a unique identifier to isolate this info, "there isn't one for these, hence my question.

 

Thanks in advance for your help.

 

 

5 REPLIES 5
estherb47
15 - Aurora
15 - Aurora

Hello @jamesgough ,

 

Would you please post as a packaged workflow or a text input? We can't access files on your computer, so the workflow fails. Thank you!

 

Cheers,

Esther

jamesgough
7 - Meteor

Sorry, hope that you can view it now. 

Thableaus
17 - Castor
17 - Castor

Hi @jamesgough 

 

Is there a possibility of  "Mgmt Rec", "Vote Instruction" and ""Proponent" happen to be in the same field? If there is, should the logic follow an order? 

 

Cheers,

estherb47
15 - Aurora
15 - Aurora

Thanks, @jamesgough for the data.

 

Here's my approach. Dynamic rename can solve the challenge, but you need to create a list of the columns you want to rename.

 

So, transpose the F1-Fn columns into "Name" and "Value". Because "Vote" and "Instruction" were on separate lines in the dataset, I used a formula tool to fix the value to "Vote Instruction". Then filter for the values you want and grab a unique set of them.

Now you can use that list in the Dynamic Rename tool, to map the Field Names from the right input rows.

 

image.pngHope this helps.

Cheers!

Esther

jamesgough
7 - Meteor

That's great, Esther. Thanks so much!

Labels