Alteryx Designer Desktop Discussions

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

How to check if date range is within a date range in the same columns

jt98
7 - Meteor

Hi, I have a problem.

I want to check if for the same ID, there is overlapping Start Date and End Date (the Bolded Row) in table 1. I want it to fill the data of that bolded row to those that are applicable to result in table 2. 

Table 1

IDStart DateEnd DatePeriodA1A2B1B2CD1D2E1E1
1114/1/20209/30/202010.70.7       
11110/1/202012/31/202010.70.7       
11110/1/20209/30/20211     0.30.3  
1111/1/20219/30/20211  0.70.7     

 

 

Table 2 (Desired Result)

IDStart DateEnd DatePeriodA1A2B1B2CD1D2E1E1
1114/1/20209/30/202010.70.7       
11110/1/202012/31/202010.70.7   0.30.3  
1111/1/20219/30/20211  0.70.7 0.30.3  

 

How can I do that? Advanced thanks!

4 REPLIES 4
Tyro_abc
11 - Bolide

Hi 

 

I think this is similar problem, basically join both table with  ID and then use formula to check if one date range is overlapping with other

 

Re: Date Schedule Wrangling/Manipulation - Alteryx Community

 

Regards

Arundhuti

jt98
7 - Meteor

Hi, Table 2 is the result that i want so i cant join anything.

clmc9601
13 - Pulsar
13 - Pulsar

Hi @jt98,

 

This is a pretty lengthy solution (I'm sure someone can come up with a more efficient one), but it returns the desired output and is relatively dynamic. It uses append fields to create all pairs, so it'll take significant computing time/power for large datasets, which is a potential drawback. I hope it helps!

Tyro_abc
11 - Bolide

If you closely look at the original solution link, it is joining same table twice.  Same thing can be done here

 

 

Labels