Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

Automatically Remove all null Colums

Highlighted
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

Highlighted
Alteryx Partner

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.

Highlighted
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

Highlighted
Alteryx Partner
 
Highlighted
16 - Nebula
16 - Nebula

@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. 

Highlighted
6 - Meteoroid

Hi @Federica_FF

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

Highlighted
6 - Meteoroid

@JordanB,

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

Highlighted
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

Highlighted
Alteryx Partner

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

Highlighted
6 - Meteoroid

@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