Alteryx Designer Desktop Discussions

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

Splitting Records Based on Dates

jrdnjhnsn2
7 - Meteor

Hey all,

 

I've got a bunch of policy data that has issue date and termination date (which may or may not be null). I'm trying to figure out how to split each record based on its "policy anniversary." 

 

For example, let's say a policy has an issue date of 10/10/2007 and termination date 12/10/2009. I want to create separate records for each of these date ranges:

  1. From 10/10/2007 issue date though 12/31/2007.
  2. From 1/1/2008 through 10/9/2008.
  3. From 10/10/2008 through 12/31/2008.
  4. From 1/1/2009 through 10/9/2009.
  5. From 10/10/2009 through 12/10/2009 (the termination date).

Using DummyID 4 in my sample data as another example, my desired output is as follows:

DummyIDPolicy_Start_DatePolicy_End_Date
41954-09-201954-12-31
41955-01-011955-09-19
41955-09-201955-12-31
41956-01-011956-09-19
 . 
 . 
 . 
42019-09-202019-09-24

Does anyone know how this can be done?

11 REPLIES 11
Sntrada
11 - Bolide

Hello @jrdnjhnsn2 

 

You should be able to use multiple filter tools to do this. 

 

If you provide a sample of your data, myself or someone else in the community can create a sample workflow using the filter tool, or other tools. 

fmvizcaino
17 - Castor
17 - Castor

Hi @jrdnjhnsn2 ,

 

Here is a simple example where I'm using the formula to flag the policy and then using a advanced function from the output data tool to separate the data into different excel tabs.

 

Best,

Fernando Vizcaino

jrdnjhnsn2
7 - Meteor

Hi @Sntrada, I attached a sample of my data to my question. Let me know if you need anything else. Thanks!

Sntrada
11 - Bolide

Hi @jrdnjhnsn2 , 

 

I've checked out your data and re-read your question. I don't think a simple stacked filter solution would work here. Sorry! Maybe someone else can help.

fmvizcaino
17 - Castor
17 - Castor

Hi @jrdnjhnsn2 ,

 

I think now I've understood what you need.

What do you need to do when you don't have the termination date? To treat as today's date or simply ignore?

 

Best,

Fernando V.

DavidP
17 - Castor
17 - Castor

Hi @jrdnjhnsn2 

 

Attached workflow will work except where Issue date is the 1st January.

 

DavidP_0-1597353663302.png

 

jrdnjhnsn2
7 - Meteor

Hi @fmvizcaino ,

 

I was literally just thinking I forgot to say what to do for the null termination date cases. I'd like to just enter today's date.

 

Thanks,

Jordan

DavidP
17 - Castor
17 - Castor

Here's a version that correctly deals with the case where issue date is the 1st Jan.

 

I made the assumption that if termination date is null to use today's date

DavidP
17 - Castor
17 - Castor

Apologies @jrdnjhnsn2, I found some bugs in how my previous workflows dealt with null termination dates.

 

This is now fixed. Please find updated version attached.

 

 

Labels