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!
Solved! Go to Solution.
Thanks @kat. Congratulations on the GP win - awesome job.
@MarqueeCrew @kat @jdunkerley79 Thank you all for your help! Your macro @MarqueeCrew worked perfectly!
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 !
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
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
Then follow up the Multi-Field Formula with the Data Cleansing tool configured to Remove null columns.