Alteryx Designer Desktop Discussions

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

Generate rows based on condition

hash_89
8 - Asteroid

Hi,

 

I have some data which looks like this.

 

ProductYearRegion
A2010AP,EU
A2013NA,AP,EU
A2017NA,AP,EU
B2011EU
B2018EU,AP

 

I would need to generate rows to show data for all the years between the years. For the last year for that product that is mentioned, i would need data to be populated for +3 years. Can any one please help me how do derive this?

 

My output should look like this.

 

ProductYearRegion
A2010AP,EU
A2011AP,EU
A2012AP,EU
A2013NA,AP,EU
A2014NA,AP,EU
A2015NA,AP,EU
A2016NA,AP,EU
A2017NA,AP,EU
A2018NA,AP,EU
A2019NA,AP,EU
A2020NA,AP,EU
B2011EU
B2012EU
B2013EU
B2014EU
B2015EU
B2016EU
B2017EU
B2018EU,AP
B2019EU,AP
B2020EU,AP
B2021EU,AP
4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @hash_89,

 

would this help?

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

hash_89
8 - Asteroid

This solution doesn't work for me. I'm not looking to add 4 rows for each row. It should be based on the year column for the product. For a product and year, it should have one row.

afv2688
16 - Nebula
16 - Nebula

Sorry @hash_89,

 

Misread it.

 

Here you go:

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

hash_89
8 - Asteroid

Perfect. Thank you very much.

Labels