Alteryx Designer Discussions

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

Automatically Remove all null Colums

mjunior7
6 - Meteoroid

Hey guys!

I have a file with more than 400 colums but many of this colums are completelly null. The null ones change everyday.

is there a way to remove automatically all this null columns and keep just the ones which have, at least, one not null line?

Thanks in advance!!

Example: I want to do something like that

inicial alteryx.pngfinal alteryx.png

19 REPLIES 19
jlewis821
5 - Atom

Can you please provide an example file on how to combine these to tools to accomplish what is described in the image above? Is it possible to hide the columns without any data in them across many tabs?

jlewis821
5 - Atom

Were you able to to this across multiple tabs (that use grouping) to only generate columns with values?

JordanB
Alteryx
Alteryx

@jlewis821 there is a workflow linked in my post under the accepted solution on page 1

jlewis821
5 - Atom

Will this work across tabs to only show columns that include data on each tab? I want each tab to show different date columns based in whether or not a transactions occurred on that date.  

JordanB
Alteryx
Alteryx

@jlewis821  can you use the table option in this chat to draw out some sample data on the various tabs and your ideal outcome?

 

Best,

 

Jordan

Jamesrich
7 - Meteor

Hi JordanB,

Do you think here is a way of packaging this up into a macro?

I want to apply it to an existing workflow that reads in a lot of Excel files and apply it to each one.

Thanks

 

123indo
6 - Meteoroid

Hi @Federica_FF , I have tried using the autofield+dynamic select as you suggested but it didn't work. The thing is my all null column was not detected as boolean by the autofield tools. Any tips on how to solve this?

 

Thank you!

AIChudnovsky
7 - Meteor

@123indo sometimes null fields end up registering as Double for me.  But if that doesn't work when you have other Double fields that you need to keep, then trying a different solution is probably best, such as @JordanB 's.

pperrot1
7 - Meteor

I was not able to get this to work.. Auto Field is defining that my null columns as "Double".... thus.. Dynamic Select is not removing them

leehaozhong
8 - Asteroid

If your null columns are Double/Numeric, add this step (Multi-Field Formula) before the Dynamic Select above.

leehaozhong_0-1643773405818.png

 

Labels