Generate dates between two dates in Alteryx
Hello friends!! We’ll be learning to generate dates between two dates using Alteryx. These quick Alteryx tip will help you use Generate Rows option in Alteryx.
Here we’ll need the Start date and End date. Add your input for start date, here I’ve added a input tool for start date as 2019-01-01. And a formula tool to set max date as Today’s date(see image below)
Now add Generate Rows tool to the canvas. Now give any name to the new field and change date type to date. 1 Initialization express will be the 1st record of the new column here I’ve given [Date], 2 condition expression will run the loop till the end date as [Date] <= [End Date], 3 loop expression will add 1 new day to new row and create new date as datetimeadd([Date],1,’days’) check image below and step 1,2,3 for reference. It will create new rows for dates.
If you want to bring dates to columns add a cross tab as shown below
Keep visiting Analytics Tuts for more tutorials.
Thanks for reading! Comment your suggestions and queries
Instead of using fields in the initialization and condition expression, how can I do it by directly using a dates instead ?
Add dates from a data file then.