Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Generating addtional date using Multi row tool

Wafarian
8 - Asteroid

Hi,

 

I have a requirement to generate missing date using Multi-row tool in Alteryx but it is not working as planned.

 

below is my requirement and I would like to generate additional date which is 29th that is missing from posting date

5ad34f1b-0bb1-4bb1-b304-560fb490d85b.png

 

 

I have implemented below logic but it is now working.

 

Multi-row generation_logic.PNG

 

much help will be appreciated in resolving it.

 

thanks,

3 REPLIES 3
ShankerV
17 - Castor

Hi @Wafarian 

 

2 observations why it didn't work.

 

1. Datetimeadd function will work for alteryx date format only (YYYY/MM/DD)

The date format in your input is different.

 

2. Multirow tool cant create new rows, you need to use Generate Rows tool to achieve creating a new row.

 

Many thanks

Shanker V

 

 

DataNath
17 - Castor
17 - Castor

Hey @Wafarian, to fill in missing dates/records, you'll need the Generate Rows tool. In setting this up, we tell Alteryx to generate rows (in this case, by adding a day to the date) until a certain condition is reached (being within 1 day of the next record's posting date). In order to get the next record's posting date in the first place, we can use the Multi-Row Formula to look ahead one row and bring this in. Throughout all of this, as your date is in DD.MM.YYYY format, we just add some extra expressions to parse this into ISO format (YYYY-MM-DD), as this is the only date format Alteryx can work with. The Formula/Select tools at the end are simply to get the generated date back into your original format - which I have assumed is the desired display - and remove temporary fields used to generate the additional rows. I've attached the workflow below but please feel free to ask us if you have any confusion or further questions!

 

DataNath_0-1676026898378.png

Wafarian
8 - Asteroid

Hi DataNath,

 

Thank you very much. That's exactly what I need and your solution solved my problem.

 

Much appreciated.

 

thanks

Labels