Alteryx Designer Desktop Discussions

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

Removing Columns with immediate row below having a Null.

TwanD
7 - Meteor

Currently I use Select tool to remove unwanted columns. However, this becomes cumbersome when there are intermittent columns with first row having null and columns with actual data. Is there a tool I can use to remove all columns with first row having null in one swoop?

 

For instance:

 

F1           F2            F3          F4

Null         Data         Null        Data

 

I just want:

 

F2             F4

Data          Data

 

This is simplified but imagine this with many fields with that pattern and I want only columns with data. Any help is appreciated!

2 REPLIES 2
jrgo
14 - Magnetar

@TwanD

 

Here's a solution for you.

image.png

 

I added one more row to illustrate the need for the RecordID field... without it, the Crosstab tool would concatenate fields without something to group on.

TwanD
7 - Meteor

Sorry for the late reply, but I've decided to make that first row containing "Data" as column headers because those are the account names, then pivot the column headers into rows under one column from your solution. Since the nulls, when dynamically renamed as column headers, they're just generic 'Field+_#' and I was able to filter that out and keep just the account names. Thank you for giving me the idea, greatly appreciated!

Labels