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

Alteryx Designer Desktop Discussions

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

?crosstabs

vivian123
7 - Meteor

Hi All, 

How do I take the earliest week with a data entry from table 1 to make table 2? 

 

Customer IDWeek 1Week 2Week 3
1 47 
2  48
3 52 

 

Customer IDEarliest Week
12
23
32

 

Thanks!

3 REPLIES 3
Kenda
16 - Nebula
16 - Nebula

Hi @vivian123 

 

 

In this case, I think it would help to first transpose your data, using the Customer ID field as a key column. From here (assuming the earliest week means the first one populated from your data), you can use a Filter tool to get rid of the empty values then use a Sample tool to only keep the first record for each Customer ID. Lastly, you can use a Formula tool to create a field that will display what week # that value came from. 

 

Hope this helps!

 

Kenda_0-1627917724321.png

 

apathetichell
19 - Altair

I remember the first time I saw "no samples, keyboards or synthesizers used in the making of this record" and I was like "Wow that's so cool!" and of course then I realized that synthesizers, keyboards and samples are awesome.

 

Anyway - if you were ever scarred by the sample tool and wanted a version without one - see the attached workflow which is (along with being horizontal) about the same as @Kenda 's awesome workflow in terms of use-value.

Junya_Wang
8 - Asteroid

this is the simplest solution I can think of

Labels
Top Solution Authors