ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Row creation

cvinju
5 - Atom

i have the below data set. so what i want is to create rows anywhere NBD is NOT 1. for example, for 12/12, NBD = 3.  i want to "fill the gap" by creating 2 rows. one for 12/13 and one for 12/14 with all the data from 12/12. the numbers of rows i need created would be determined by the number in the NBD column - 1.  

 

start:

 

Begin DateNBDINC RATIO INT INC  AMORT  STGL 
12/11/202514.52     1,474,492.49    154,906.01   12,987.71
12/12/202534.35     1,392,897.43    189,854.47    (1,507.33)
12/15/202514.77     1,565,859.49    172,362.66                       -  
12/16/202514.33     1,402,171.60    177,340.59    (4,281.20)
12/17/202515.34     1,705,424.20    218,535.97   18,488.18
12/18/202514.38     1,398,298.55    195,066.07                       -  
12/19/202534.71     1,533,445.90    184,799.98                 0.78
12/22/202514.89     1,588,527.00    200,739.36    (4,469.60)

 

end state:

Begin DateNBDINC RATIO INT INC  AMORT  STGL 
12/11/202514.52     1,474,492.49    154,906.01   12,987.71
12/12/202534.35     1,392,897.43    189,854.47    (1,507.33)
12/13/202534.35     1,392,897.43    189,854.47    (1,507.33)
12/14/202534.35     1,392,897.43    189,854.47    (1,507.33)
12/15/202514.77     1,565,859.49    172,362.66                       -  
12/16/202514.33     1,402,171.60    177,340.59    (4,281.20)
12/17/202515.34     1,705,424.20    218,535.97   18,488.18
12/18/202514.38     1,398,298.55    195,066.07                       -  
12/19/202534.71     1,533,445.90    184,799.98                 0.78
12/20/202534.71     1,533,445.90    184,799.98                 0.78
12/21/202534.71     1,533,445.90    184,799.98                 0.78
12/22/202514.89     1,588,527.00    200,739.36    (4,469.60)
3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Hi @cvinju 

 

Here's how I'd approach this:

  1. Convert begin date to be a date 
  2. Multi-row formula to check if the next row is a sequential day. If not, add a field listing the next day.
  3. For records where it is not, generate rows for days in between the two dates flagged in the above step

 

 

image.png

cvinju
5 - Atom

this worked. thank you very much.

Qiu
21 - Polaris
21 - Polaris

@cvinju 
If my understanding is correct, we can do it as below, by using the number "NBD" to generate rows and also modify "Begin Date".

1224-cvinju.png

Labels
Top Solution Authors