Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Eliminating a column if it has a null value

dogregory
7 - Meteor

Hello,

 

Due to company policy I cannot post workflows or data. I have PDF of the workflow at the relevant point. 

 

If you see a null in the column it's because it failed a criteria. I need to eliminate those columns. I originally tried to use Auto-field to reduce to the smallest data size and then eliminate those, but that only eliminated entities that didn't match a list. The two rows at the bottom may have information in them that makes the whole column INT16 or INT32. 

I also thought about a filter but I can't have a filter that lists all columns because there are too many and they will also change in number. 

Any help is appreciated. 

11 REPLIES 11
AngelosPachis
16 - Nebula

Hi @dogregory ,

 

Which version of Alteryx are you on?

dogregory
7 - Meteor

@AngelosPachis 2020.4 X64

echuong1
Alteryx Alumni (Retired)

The data cleansing tool will actually profile and remove any column/row that is entirely null if you check off the option.

 

echuong1_0-1613508037822.png

 

dogregory
7 - Meteor

@echuong1 Will this work if there is data in the column, but it also has nulls?

echuong1
Alteryx Alumni (Retired)

This will only remove a column that is entirely null.

 

For example, the below will have Field2 removed, but not Field3.

echuong1_0-1613508215256.png

 

AngelosPachis
16 - Nebula

Nope @dogregory ,

 

If there is at least a single column that has a value for a particular record, then no columns will be removed for that record

 

I was asking about the version you are in so I can suggest using the Data Cleansing tool, because this feature was introduced in version 2020.

 

dogregory
7 - Meteor

@echuong1 oh well. I need it to remove a column if it has any nulls, but may still have data. Thanks for the assistance. 

AngelosPachis
16 - Nebula

Can you give a better example of what you are after @dogregory  so @echuong1  and I could help (or any other person in the community).

 

You are looking for a way to remove rows which are null for all your columns right? What's the reason that will make the data cleansing tool not to work in this instance?

echuong1
Alteryx Alumni (Retired)

A couple of ways to do this, but here's how I generally approach it.

 

I'll essentially create a flag and identify any field that contains a null in general. From there, you can use that to know which fields to carry forward.

 

echuong1_0-1613508731005.png

echuong1_1-1613508770395.png

 

 

Labels
Top Solution Authors