Hi,
I have some data which looks like this.
Product | Year | Region |
A | 2010 | AP,EU |
A | 2013 | NA,AP,EU |
A | 2017 | NA,AP,EU |
B | 2011 | EU |
B | 2018 | EU,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.
Product | Year | Region |
A | 2010 | AP,EU |
A | 2011 | AP,EU |
A | 2012 | AP,EU |
A | 2013 | NA,AP,EU |
A | 2014 | NA,AP,EU |
A | 2015 | NA,AP,EU |
A | 2016 | NA,AP,EU |
A | 2017 | NA,AP,EU |
A | 2018 | NA,AP,EU |
A | 2019 | NA,AP,EU |
A | 2020 | NA,AP,EU |
B | 2011 | EU |
B | 2012 | EU |
B | 2013 | EU |
B | 2014 | EU |
B | 2015 | EU |
B | 2016 | EU |
B | 2017 | EU |
B | 2018 | EU,AP |
B | 2019 | EU,AP |
B | 2020 | EU,AP |
B | 2021 | EU,AP |
Solved! Go to Solution.
Hello @hash_89,
would this help?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
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.
Sorry @hash_89,
Misread it.
Here you go:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
Perfect. Thank you very much.