Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

For Loop create N empty rows

dennisklad
6 - Meteoroid

Hello

everybody, I ve been searching for quite some time now but I cant find anything that fits my Use case.

 

It is a complicated one so bear with me. Thanks.

 

So I want to create a dataset, which has every day of an interval, for example if it is one year, I need 365 rows.

Every row should have the count of the according tasks that are still active on that date.

At a later stage I want to aggreggate the values per date till it reaches 100%.

 

Example:

 

Input:

ID      Start Date          Finish Date        Duration

01     01.01.2019        10.01.2019               10

02     03.01.2019        10.01.2019                7

03     05.01.2019        08.01.2019                3

04     08.01.2019        11.01.2019                3

 

 

Expected Output:

Date      Count   Percent

01.01       1            1

02.01       1            2

03.01       2            4

...

10.01       3            

11.01       1

 

The problem I encounter is that there is no easy way to create a For Loop like for example in Java.

In short the use case is to create as many rows from max(Finish Date) - min(Start date) + 1 (inklusive), in the example 11.01 - 01.01 + 1 =  11days.

 

 

Thanks again

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @dennisklad ,

 

Use the generate rows tool for that and select the limit to be lower than the duration column

 

Regards

afv2688
16 - Nebula
16 - Nebula

Here is an example:

 

Untitled.png

kelsey_kincaid
12 - Quasar

Hi @dennisklad ,

This is a great use case for the 'Generate Rows' tool. I attached a rough example here and a screenshot below.

kayers_0-1578412390552.png

kayers_1-1578412402304.png

CharlieS
17 - Castor
17 - Castor

Just like @afv2688  said, the Generate Rows tool is the key here. Check out the attached example to see this in action. 

Labels