community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Move the data in specific columns to top without any conditions

Meteor

postatc1.JPG

 

I am trying to get the above said output. No of rows may vary in input sheet. I used union tool to get the input data.

Alteryx Certified Partner

@Sethu ,

How do you know which row (From Brand, Product, price set) aligns with which row (Brand, Rank, Rating set)?  If the records are simply aligned by position then I would join the datasets together instead of unioning and join by record position.  Need more information to understand how the datasets align.

 

Bolide
Bolide

Hi @Sethu 

You can do it this way (also attached) to get the expected output in your picture:

NULLremove.PNG

 

 

But completely agree with @Dynamomo  . It can be a bit of a dangerous game to start moving some cells up, as the end table may not align in the way you're expecting (e.g. Samsung and Nokia being one row, as per your example and this output)

 

You can do via a join on record position or even a transpose and cross tab; I've used a running total to 'define' what record ID each row should be for the output - but remember the logic here is to simply remove all NULL cells, shifting everything else up, no other 'rules' are being applied...

 

Hope that helps

Andy

Meteor

I do not have any condition to align. Just wanted the columns 4. 5 & 6 to move up.

Let me ask this: Columns 1, 2 & 3 are from Table 1. columns 4, 5 & 6 from Table 2 respectively.

How to get the expected output(just the values from columns 4, 5 & 6 should be from row1 without any conditions)

Bolide
Bolide

@Sethu  in that example (different tables) you can just join by record position then:

JoinRecordPosition.PNG

as @Dynamomo suggests 

Meteor

@andyuttley 

Thank you. But while joining if table 1 has 10 records and table 2 has 15 records output comes for 10 records only remaining 5 records from table 2 is not coming. any suggestions please?

Highlighted
Bolide
Bolide

It's just that they'd be falling out the right. You can just union them back in:

Capture5.PNG

 

If you wanted to account for any instances of records falling out, you could connect all 3 join outputs to your union (e.g. if you're plugging in different files each time)

Meteor

Thanks a lot @andyuttley @Dynamomo 

Labels