Alteryx Designer Discussions

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

Macro to Delete Null Rows and/or Columns

Alteryx Partner

In response to the Idea by @r4upadhye


The attached macro will delete rows where all selected fields are null, and/or delete all fields from those selected were all values are null.


delete null.png


What can be done to make this macro better in any way?


Alteryx Certified Partner

Great Solution...

Thanks Joe for bouncing back instantly.....!!!

Alteryx Certified Partner
Alteryx Certified Partner
As a matter of fact yes. I would suggest that you change data types for all fields to BOOL prior to transposing the data. Make the data as light as possible.


Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Alteryx Partner

Thanks @MarqueeCrew and @r4upadhye , macro updated. 🙂

5 - Atom

Thank you Joe. 

But  i am new here. Could i ask two questions?

1)---How can i use this macro that you designed? i replaced the input section by Union, but it seems doesn't work


2)---How could i use the every module in Interface like Action\check box and so on. I cannot understand only by the simple description given by click.


Thank you again!



5 - Atom

Sorry for unload wrong document.

5 - Atom

Could you save the Macro in a format that the 10.6 Alteryx can open it as well?

7 - Meteor

This is exactly what I needed. It really should be part of Alteryx.

5 - Atom

I have an Excel file where I had to delete rows if the field in the first column was blank.  Basically it was an ID field and one of two other columns in the row had sub-totals that I needed to eliminate for my data to work in Tableau and not double count the totals.    


I was able to use the Filter Tool's Basic Filter.  I selected that first field from the drop down.


Then selected "Is empty" (last box is blank).    


All of the rows where the first column was blank (empty) were "True" and the rows I wanted to keep were "False."   I then continued the workflow with export into Tableau and it worked perfectly.  


Hope this helps someone with a similar situation.