Dear Community,
I have a trouble generating rows in this table. What is needed is to generate rows by incrementing dates by the number indicated in column "New Field".
For example, according to the 1st record I need to generate rows as following:
Date | USD/AZN rate | New Field |
03/04/2022 | 1.7 | 2 |
02/04/2022 | 1.7 | 2 |
Please find the input data table below and the attached workflow to be completed according to the request.
Date | USD/AZN rate | New Field |
01/04/2022 | 1.7 | 2 |
18/03/2022 | 1.7 | 9 |
11/03/2022 | 1.7 | 2 |
05/03/2022 | 1.7 | 3 |
25/02/2022 | 1.7 | 2 |
18/02/2022 | 1.7 | 2 |
11/02/2022 | 1.7 | 2 |
04/02/2022 | 1.7 | 2 |
28/01/2022 | 1.7 | 2 |
21/01/2022 | 1.7 | 2 |
19/01/2022 | 1.7 | 1 |
14/01/2022 | 1.7 | 2 |
07/01/2022 | 1.7 | 2 |
Thanks all!
Solved! Go to Solution.
Hi @Elmin ,
Please find attached one way of doing this. It makes use of the multi-row formula and the below formula to generate the rows.
if [RowCount]=1 then [Date]
else DateTimeAdd([Row-1:Date],1,'days')
endif
Hope this helps.
Best,
Jagdeesh
Hi @Elmin,
to share another method than the one made by @JagdeeshN and a great tool to use and learn : Generate Rows
The tool will loop until a condition is met and generate rows.
To use it here, I just used the field you had and set it up to loop to add +1
Find attached an example workflow
I have a CReW macro made to generate date records: https://community.alteryx.com/t5/Public-Community-Gallery/CReW-Generate-Date-Rows/ta-p/926163
The complexity of the datetimeadd() function within the loop throws beginner users. This macro help to simplify the task.
Cheers,
Mark
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |