Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
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
dogregory
7 - Meteor

@AngelosPachis 

 

The data coming in was previously sorted by EIN. As you can see from the PDF I posted most of the columns have the first five rows as null value. This is because the EINs of those columns didn't match a list that went into a join tool I previously used. The positions of the records still match though, so the two rows at the bottom (more to be added) will never be null. You can't see them, but the columns there are columns with information all the way down. Those are the ones I'm looking to keep.

I wish I could post the whole workflow, but company policy.

Thanks,
Doug

SeanAdams
17 - Castor
17 - Castor

Hey @dogregory 

  • if you use a transpose tool, it changes all columns to rows.    This adds two columns called "Name" and "Value"
  • You then filter for which have null values - and name of the column will be in the "Name" column in your data set
    • and if you use a unique - you can quickly find the offending columns
  • Now you can either:
    • Crosstab this back to rows and columns
    • Or use something like the Dynamic Select (on the original dataset) to dynamically remove columns

🙂 this is a great use for Transpose

Labels
Top Solution Authors