Alteryx Designer Desktop Discussions

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

Shift Nulls to the bottom

ahmedalra
7 - Meteor

Hi,

 

I receive files constantly, and each time the number of columns and rows varies. There would be nulls in different places. I would like to know how to push all nulls from each column to the last rows of that column. Below you can see an example of how my data is structured, and how I want them to be. Also, attached a workflow that can do it. But, it is not what I am looking for since it is not dynamic which I need because the number of columns would vary each time. 

 

  

Original Data sampleOriginal Data sampleNeeded Data sampleNeeded Data sample

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

I think something like:

2018-12-24_09-34-43.png

 

First add a record ID (for ordering)

Then transpose the data and filter for nulls

Create a Rank for each column using a multi-row formula grouped by field

Next cross tab grouped by Rank

The final join is just to reproduce the extra null rows and can be skipped if not needed.

 

Sample attached

ahmedalra
7 - Meteor

Thanks a lot

Labels