Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically select column based on information from another column

stephouyang
5 - Atom

Hi, 

 

I'm trying to select all the columns that end in the value of the last column. How can I do that? 

 

 

My last column is dynamic, for period 1 it will show _1, period 2 it will show _2, etc.

 

When it's period _1 (which is the last column in the input file), I want to select 2 columns "PERIOD_1" & "C_PERIOD_1".

 

When it's period _2 , I want to select 2 columns "PERIOD_2" & "C_PERIOD_2".

 

 

Attached a sample input file.

 

Many thanks! 

10 REPLIES 10
stephouyang
5 - Atom

Thank you all for the reply! The solutions are so simple yet brilliant. 

Labels
Top Solution Authors