Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Eliminating columns based on cell value

julianveda
7 - Meteor

Hi Community,

 

I wonder if you could help me out with a case:

 

I would like to eliminate dynamically some columns that have a cell with the word "Description". In the image below this are the red columns (Header 5, Header 8, Header 11).  I'd still like to keep column 2 that also has the word "description" in it. Do you know how I could do this dynamically beacause I might deal with files having more columns.  I guess this could be done with Multi-Field formula tool, but since I'm still new to Alteryx, I do not know how to use it well.

 

Please find the photo of the existing and expected result below and I have also attached the Excel file.

 

Thanks for reading

 

julianveda_0-1684914363756.png

 

8 REPLIES 8
flying008
15 - Aurora

Hi, @julianveda 

 

Maybe this is your want:

 

录制_2023_05_24_16_37_43_182.gif

 

julianveda
7 - Meteor

Hi @flying008 , Thanks for your answer.

It seems to answer my question, but could you plase share the workflow to confirm this, but also to learn from your solution ?

 

FrederikE
13 - Pulsar

Hey @julianveda,

 

This shoud work aswell: 

FrederikE_1-1684923777375.png

 

 

julianveda
7 - Meteor

@FrederikE  thank you very much for your answer. I saw that after "cross tab" tool headers are not longer in order and it seemes you used a "select tool" to manually order them. Is there a way to order the headers dynamically ?

FrederikE
13 - Pulsar

Hey @julianveda,

 

Kind of: There is a Macro for this, see http://www.chaosreignswithin.com/2014/08/field-sort-macro.html

This sort fields ascending/desc by name, the problem is with your headers this means "Header_10" is before "Header_2". But you could modify the macro to pick up only the numbers and sort by them. But this is for sure annoying and if you have only the "Header" name I would just define it once then Alteryx knows the metadata and it should be fine. 

julianveda
7 - Meteor

thank you @flying008, I tried to reproduce what you showed and it worked :)

julianveda
7 - Meteor

Thank you @FrederikE  for the link. However, I am not able to use files coming from non secure sites in my computer.

flying008
15 - Aurora

Hi, @julianveda 

 

congratulation!  If you get your want, please mark it as a solution for more share.

Labels