Alteryx Designer Desktop Discussions

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

Columns selection based on the certain condition

akumar2609
8 - Asteroid

I need help in selecting the column range based on some condition. In below example find the By LOB column and then pick next ten columns. So In total there will be 11 columns including By LOB.  Point to remember that the Qtr. header names will keep on changing depends upon the reporting months.    

In the final output file, I need the  “Name” + “By LOB”+10 qtr. columns. There are very high possibilities position of the columns will keep on changing, but By LOB and next 10 columns will be at one place in the dataset. 

Name

Class

By LOB

9-QTR

4Q2022

1Q2023

2Q2023

3Q2023

4Q2023

1Q2024

2Q2024

3Q2024

4Q2024

Excel

Mapping to Excel file

By CTR

9-QTR

4Q2022

1Q2023

2Q2023

3Q2023

4Q2023

1Q2024

2Q2024

3Q2024

4Q2024

2 REPLIES 2
Clifford_Coon
11 - Bolide

Hi @akumar2609 ,

 

Here is an example of how I interpret your issue:

Make vertical with field summary, then create Select tool xml.

Annotation 2023-04-27 073910.jpg

Then pass to a batch macro to perform the select.

Annotation 2023-04-27 073547.jpg

 

Hope this helps, Happy Solving

SPetrie
12 - Quasar

Another option is to use a dynamic rename to update the field descriptions with which ones you want to keep and then a dynamic select to grab just those.

SPetrie_0-1682603421362.png

SPetrie_1-1682603546638.png

 

 

 

Labels