Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

How To: Combine Date Ranges with a Macro

Alteryx_KB
Alteryx
Alteryx
Created

How To: Combine Date Ranges with a Macro


This module (and embedded batch macro) will provide a comprehensive timeline or date range(s) using multiple, overlapping date ranges.
 

 


 The macro converts date ranges into spatial objects in order to use the spatial functions in Alteryx to group overlapping or adjacent ranges. This ensures that ranges A and C get are grouped together when A and C do not overlap but both A and C overlap range B (and so forth for larger chains of ranges).

 

 

2019-04-22_12-01-32.png

 

 

 

It also allows for “jumping” a user-determined number of days in order to combine regions that do not overlap but are within a specified number of days of one another.


2019-04-22_12-03-16.png

 



 

 

Attachments
Comments
alepique
7 - Meteor

This article was EXTREMELY helpful for our use case!  Thank you for sharing the insight here!

KrisManns
5 - Atom

I downloaded this worklfow and used the macro in one of my workflows.  When I save the workflow for some reason the Control Parameter portion of the macro does not save.  When I reopen my workflow with this macro the control Parameter tab is missing.  Do you know how I can fix this so the Control Parameter saves correctly?