Hi,
I have a dataset with a customer, a first year of service and a last year of service. I'm trying to use the Generate Rows tool to build a row for each year of service in the range, but I'm having trouble with the expressions to get what I need.
Customer | First Year | Last Year |
A | 2018 | 2019 |
B | 2015 | 2019 |
C | 2017 | 2021 |
What I'm trying to get out of this looking for with the output is a row for each year the customer was in service, kind of like an anniversary report:
Customer | First Year | Last Year | Anniversary Year |
A | 2018 | 2019 | 2019 |
B | 2015 | 2019 | 2019 |
B | 2015 | 2019 | 2018 |
B | 2015 | 2019 | 2017 |
B | 2015 | 2019 | 2016 |
C | 2017 | 2021 | 2021 |
C | 2017 | 2021 | 2020 |
C | 2017 | 2021 | 2019 |
C | 2017 | 2021 | 2018 |
Here's my tool config. Any help or suggestions would be greatly appreciated!
Regards,
Jake
Solved! Go to Solution.
Condition expression: [Anniversary Year] - [First Year] > 0
Loop expression: [Anniversary Year] - 1
@CoG that was what I was missing in the conditions. Thank you and thanks all for the help!