Start Free Trial

Alteryx Designer Desktop Discussions

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

Generate Rows not producing final row

tlewis
7 - Meteor

I am trying to use Generate Rows to produce the final data set shown below:

tlewis_0-1656431814272.png

I am able to generate rows for 7/1/2014 - 4/22/2019 but I am unable to see why the final row (1/1/2020) will not be produced.

 

I have added a formula in my workflow to help breakdown the condition and loop expression results for the Generate Rows tool. The formula tool results seem to indicate Begin Period = 4/22/2019 will have Condition = True and Loop = 1/1/2020 but that is not what is happening.

 

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Hi @tlewis 

 

That's quite the formula you have in there. I took a different approach that seems to get what you want:

 

  1. Generate a row for each between the start and end 
  2. Add a tile tool (this will come in handy later on and help if you are processing multiple policies)
  3. Apply your logic in the filter tool:
    1. First record (based on tile tool)
    2. Anniversary of policy
    3. Jan 1st
    4. Filters out the last record based on Study End
  4. Populate End Period as 1 day less than the next row's begin period, unless it's the last record in which case we use 1 day less than the study end.

 

Luke_C_0-1656435439069.png

 

alisonpitt
11 - Bolide

Hi @tlewis I think the issue is that on the next row the condition will be FALSE, so it doesn't generate the row. I added an additional check to your MIN statement, to check against [Begin Period], which makes that last row TRUE, and makes it show up. It works in this case, hopefully it will work for the rest of what you're doing!

Spoiler
generate-rows-problem-AP.pnggenerate-rows-problem-AP.png
tlewis
7 - Meteor

Thanks, your explanation helped me realize I was associating the wrong Begin Period input in the condition expression. Once corrected, I was able to simplify the condition to be: [Study End] >[Begin Period].

Labels
Top Solution Authors