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

Alteryx Designer Desktop Discussions

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

Matching Columns and Aligning Data by Including Blank Cells

lavender_alias
5 - Atom

Hi there, 

 

I have two years that have data sequential order, however each year is missing some values. I want to be able to compare the two years and order them in a way that allows me to see which data is missing from each year. The only way to align them is by shifting the cell down, but sometimes you need to shift the data down multiple cells. Is there a way to do this in Alteryx?

 

See below for the input I currently have and how I would like it to look after I run it through Alteryx. 

 

Current Data I have:

 

YEAR 1YEAR 2
11
23
44
56
67
810
911
1012
1114
1315
14 
16 
  
 
 
The Output I want: 
 
YEAR 1YEAR 2
11
2 
 3
44
5 
66
 7
8 
9 

10

10
1111
 12
13 
1414
 15
16 

 

6 REPLIES 6
Raj
16 - Nebula

Find the Sol Attached.

Brankl
7 - Meteor

Raj's solution looks right, but I think there's an easier answer.

 

  • Separate out Year 1 and Year 2 into separate tables using two instances of the select tool
  • Join the data together and union together all 3 join outputs
  • Create a third column to take the longer string of the first two to make that third column the one you sort by
Qiu
21 - Polaris
21 - Polaris

@lavender_alias 
Similar with the idea of @Brankl but I am not sure it is now simpler or not. 😁

0131-lavender_alias.png

lavender_alias
5 - Atom

This works perfectly! Thank you so much!

lavender_alias
5 - Atom

thank you!

lavender_alias
5 - Atom

haha no this is great! thank you!!

Labels