Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Row Generator - Add Rows for Missing Dates within a Range

felixcaspari
7 - Meteor

Alteryx Community,

 

I am trying to leverage the "Generate Rows" tool to add (missing) dates to my data set. The goal is to have a row for every single day that falls within the min/max date range of a given project ID. The visual will make it easier-

 

Data Input: 

 

Row_Generator_Input.PNG

 

Desired Data Output (the grey rows are the rows I would like to have added):

 

Row_Generator_Desired_Output.PNG

 

Thank you,

Felix

 

4 REPLIES 4
neilgallen
12 - Quasar

the attached workflow should get you there.

The generate rows tool in your case would need to know the minimum and maximum date for each product ID. After that, join back to your original dataset and use the multi-row formula tool to fill in the gaps.

 

row creation.PNG

brindhan
9 - Comet

Capture.PNGThis should work. Let me know.

ponraj
13 - Pulsar

Sample workflow. 

 

WorkflowWorkflow

estherb47
15 - Aurora
15 - Aurora

Hi @felixcaspari

 

My go at a solution for you. I also used the MultiRow formula tool, like @brindhan. Just simplified the formula a bit. You can use <, >, and = when comparing dates in Alteryx. 

My formula:
IF [DateTime_Out]<=[Row+1:DateTime_Out] THEN [Row+1:DateTime_Out]
ELSE [DateTime_Out] endif

Also included a few tools to return the date to the original text format if desired.

 

Cheers!
Esther

Labels