Start Free Trial

Alteryx Designer Desktop Discussions

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

Date range within Date range

jt98
7 - Meteor

Hi, desperately and urgently need help on this.

I have a problem. I want to be able to find if a date range is within a date range of table and join it. 

Table 1

IDStart DateEnd DatePeriodPrice 1
194/1/20204/30/202010.141582
195/1/20205/31/202010.14152
196/1/20206/30/202010.11553
197/1/20207/31/202010.10913
198/1/20208/31/202010.1013
199/1/20209/30/202010.10542
1910/1/20206/30/202210.1013

 

Table 2

IDStart DateEnd DatePeriod% A% B% C
197/1/20206/30/202210.70.3[Null]


If the date ranges in Table 1 is within the date range in Table 2, then assign the values of % A etc to Table 1

It should look like that

IDStart DateEnd DatePeriod% A% B% CPrice 1
194/1/20204/30/20201[Null][Null][Null]0.141582
195/1/20205/31/20201[Null][Null][Null]0.14152
196/1/20206/30/20201[Null][Null][Null]0.11553
197/1/20207/31/202010.70.3[Null]0.10913
198/1/20208/31/202010.70.3[Null]0.1013
199/1/20209/30/202010.70.3[Null]0.10542
1910/1/20206/30/202210.70.3[Null]0.1013


Really need this to work. Advanced thanks!

5 REPLIES 5
mbarone
16 - Nebula
16 - Nebula

Is table 2 always just going to have one date range (i.e., one record) in it?  If so, I'd probably append that record to table 1 and use a formula tool to create the % columns.  But that only works well if table 2 has just the one record.  Otherwise, appending probably wouldn't be the best way to go.

jt98
7 - Meteor

Appending doesnt work as i would end up with 2 mil rows considering that i have large data to deal with

mbarone
16 - Nebula
16 - Nebula

There is only 1 row in your table 2.  So you should end up with the same number of rows as table 1.  So your table 2 actually will have more than 1 row?  

mbarone
16 - Nebula
16 - Nebula

Table1:
2021-01-18 08_33_22-Alteryx Designer x64 - New Workflow1_.png

 

Table 2:

2021-01-18 08_33_32-Alteryx Designer x64 - New Workflow1_.png

 

 

 

Append:
2021-01-18 08_33_50-Alteryx Designer x64 - New Workflow1_.png

messi007
15 - Aurora
15 - Aurora

@jt98,

 

what if you do a join with the Id?

 

 

messi007_0-1610976904266.png

 

Attached the workflow,

 

Hope that helps!

Regards,

 

Labels
Top Solution Authors