Alteryx Designer Desktop Discussions

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

Remove Empty Columns without Select Tool

Chirag_Gandhi07
8 - Asteroid

Hi everyone,

 

How can I remove the empty columns (they are empty, not null) without having to use the select tool. I am pretty sure this can be done with transpose and cross tab tools but I am not entirely sure how. I have attached a screenshot of some data. I would like to remove the columns Title 5, Title 6, and Title 7. Any help would be much appreciated.

Thank you!

15 REPLIES 15
jdunkerley79
ACE Emeritus
ACE Emeritus

Thanks @kat. Congratulations on the GP win - awesome job.

Chirag_Gandhi07
8 - Asteroid

@MarqueeCrew @kat @jdunkerley79 Thank you all for your help! Your macro @MarqueeCrew worked perfectly!

Chirag_Gandhi07
8 - Asteroid
 
DanHare
11 - Bolide

Just in case anyone gets past the w1lly waving... 😃

 

I'd like to add a round of applause for this macro.

It's brilliant for when you are pulling data straight in from Salesforce, CRM, Xero etc.

 

Great work Mark !

TonyAdam
8 - Asteroid

I had a similar challenge. I also wanted to remove Empty or NULL columns from my data set. This is how I found this thread. But additionally I wanted to remove all columns that have the same value in all rows and by that don't provide any value. I played around with the Basic Data Profile Tool and build a macro around it. When I tested it, I noticed that it could also easily remove the Empty/NULL columns. So it solves both of my issues in one step and it is quite simple and fast 😄

 

I also shared it in the Gallery: https://gallery.alteryx.com/#!app/Remove-useless-columns/5e6acbbd0462d70dd8d41d1b

 

Thanks for the inspiration from your macro @MarqueeCrew 

 

Tony

jhaines
7 - Meteor

With the Multi-Field Formula tool, Select "All Types of" fields and then in the expression window put this formula:

IF IsEmpty([_CurrentField_])
THEN Null()
ELSE [_CurrentField_]
ENDIF

 

jhaines_3-1611947148185.png

 

 

 

Then follow up the Multi-Field Formula with the Data Cleansing tool configured to Remove null columns.

jhaines_1-1611947081592.png

 

 

Labels