Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Deleting a Specific column with 'null' values

lindsayhupp
8 - Asteroid

Hello everyone!  I have a workflow with two separate calculations.  Based on inputs from the user the workflow either goes through 1 calculation or the other.  I then union them together at the end.  All of the columns are the same for each path/calculation except for one.  For instance, if one calculation path is taken the last column will be 'Calculation 1' while the other one will say 'Calculation 2'.  Therefore when I union the data, both columns are included even though one column may be completely null.  Is there a way to remove one specific column of all of the values contained are null?  I tried using a Data Cleansing Tool, but due to the calculations being performed there are some 'null' columns I need to include.  The Data Cleansing Tool removes all null columns, when I only want it to remove a specific null column

6 REPLIES 6
MilindG
12 - Quasar

Can you use the filter tool to remove the specific null column?

Luke_C
17 - Castor

Hi @lindsayhupp 

 

One approach would be to use an autofield tool (this assigns null columns as Booleans). Then you could use a Dynamic Select Tool to drop out specific columns based on their name and data type. i.e. not columns of specific names that are also booleans.

DataNath
17 - Castor

@lindsayhupp my first thought here was just to stick with the Data Cleanse tool. When you mention that you only want this to apply to certain fields and it's currently removing all, is this because you have all of the fields ticked here, rather than only the couple you want to treat this way?

 

DataNath_0-1666281961197.png

lindsayhupp
8 - Asteroid

Yes, I ticked only the columns I wanted it to look at, but it still removes all null columns. 

gyang3
Alteryx Alumni (Retired)

@lindsayhupp The Remove Null Data option in the Data Cleansing tool acts independently of the "Select Fields to Cleanse". Maybe I'm missing something but why not bring in a Select tool and deselect those columns that you want removed?

Luke_C
17 - Castor

Hi @lindsayhupp 

 

Here's an example of what I described previously. Both inputs contain a field column and 2 calculation columns. The dynamic select removes the calculation column that is null.

Luke_C_1-1666299590936.png

Luke_C_2-1666299603422.png

 

 

Labels