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

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
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

20 REPLIES 20
Federica_FF
11 - Bolide

Hi,

 

if you don't have any boolean useful (that you want to keep) fields, you could use the autofield+dynamic select.

 

A field/column with all null rows is detected by the autofield tool as boolean (the autofield tool assigns the smallest size possible, that means boolean). After that you can use a dynamic select to select everything but not boolean fields.

JordanB
Alteryx
Alteryx

Hi @mjunior7

 

I have attached an example which renames the field headers for the Null fields and dynamically de-selects them.

 

Best,

 

Jordan Barker

Solutions Consultant

Federica_FF
11 - Bolide
 
patrick_digan
17 - Castor
17 - Castor

@mjunior7 I use @ned_blog's macro from this (old) post. I haven't tried them personally before today, but it looks like @AlexK has one (similar to Ned's) and @Hollingsworth has another one (he's added some cool functionality) on the gallery. 

mjunior7
6 - Meteoroid

Hi @Federica_FF

It's really simple and worked!!! Thank you so much!

mjunior7
6 - Meteoroid

@JordanB,

I tried to use your solution but, unfortunately, it did not work :-(

ldp
5 - Atom

Hi Frederica,

Is there something I am suppose to select in Auto Field?  And what do I select in the Dynamic Select?

 

Best Regards

Federica_FF
11 - Bolide

Hi @ldp,

 

for the Autofield just be sure that all the Fields you want to check are selected/checked in the tool configuration panel.

 

For the Dynamic Select you can configure the tool like this:

select.JPG

AIChudnovsky
7 - Meteor

@JordanB Thanks! This workflow helped a great deal.  I have some blank cells instead of null cells so using CountNonBlank in the Summarize Tool helped capture both blanks and nulls.  If you also wanted to remove any columns that had zeros, in addition to blanks and nulls, I'm not sure how to apply that to your approach.  But otherwise, very helpful!

Labels
Top Solution Authors