Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Need to generate rows to add all years in a range

Jake_Seymour
5 - Atom

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.

CustomerFirst YearLast Year
A20182019
B20152019
C20172021

 

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:

CustomerFirst YearLast YearAnniversary Year
A201820192019
B201520192019
B201520192018
B201520192017
B201520192016
C201720212021
C201720212020
C201720212019
C201720212018

 

Here's my tool config.  Any help or suggestions would be greatly appreciated!

Screenshot 2024-08-09 161422.png

 

Regards,
Jake

4 REPLIES 4
Paridhi_Agrawal
8 - Asteroid

Try this:

CoG
14 - Magnetar

Condition expression: [Anniversary Year] - [First Year] > 0

 

Loop expression: [Anniversary Year] - 1

flying008
15 - Aurora

Hi, @Jake_Seymour 

 

FYI.

 

录制_2024_08_10_11_40_41_411.gif

Jake_Seymour
5 - Atom

@CoG that was what I was missing in the conditions.  Thank you and thanks all for the help!

Labels
Top Solution Authors