Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Selecting data in fields where field names are in a column

jamesfbeard1
6 - Meteoroid

Hi all,

 

I have a workflow which uses a raw data set of about 1000 columns. I have one column where each record has one of the other column names in that column. I want to be able to build a formula that pulls through the data from the respective column where the record has that column name, named. Is this something quite easy to do? I don't want to have to build 150 different formula tools.

 

Example Data attached.

4 REPLIES 4
grossal
15 - Aurora
15 - Aurora

Hi @jamesfbeard1,

 

here is an easy way to do this: 

 

grossal_0-1587314952158.png

 

Output:

grossal_1-1587314978867.png

 

 

What happens:

1) Add a RecordID

2) Shift all the data columns

3) Join everything based on the column names and RecordID back together

4) Sort it

 

 

I'll attach the workflow for you. Let me know what you think.

 

Best

Alex

JosephSerpis
17 - Castor
17 - Castor

Hi @jamesfbeard1 I mocked up a workflow let me know what you think?

atcodedog05
22 - Nova
22 - Nova

Hi @jamesfbeard1 ,

 

Here is an approach to accomplish your requirement.

atcodedog05_1-1587316725897.png

All columns after from book_name is converted to rows so that if can matched to find the new value.

atcodedog05_2-1587316824424.png

Only column Names that matched Column (with Column Names) were filter for use.

atcodedog05_3-1587316920326.png

Later the old table with data and new table with generated value is joined over Name (which is a unique key in the scenario).

 

Generated output looks like this with the column outputted value having the new value.

atcodedog05_4-1587317086920.png

 

The workflow is attached in the reply.

 

I hope this helps your purpose. If there any help you need with anything specific you are looking for please reply back.

If it solves your use-case please like the reply and mark the reply as accept solution.

 

PS: really appreciate that you were able to provide the file or else it would have been harder to provide solution.

 

Thank you for sharing this scenario. It was a great exposure.

Cheers and Happy Analyzing : )

 

 

jamesfbeard1
6 - Meteoroid

This worked perfectly thanks!

Labels