Alteryx Designer Desktop Discussions

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

Need to count how many values of a list are between two other given date values.

rohan146
6 - Meteoroid

Hi gurus, this is my problem:

I need to count how many holidays are between two dates, I have a list of events with a start_date and end_date and another list with holidays. Now the trick part is there are multiple rows with each row having different start and end date.

 

Resuming, for every record in the events list, I need to see how many holidays are between start_date and end_date and put this count as another column in the record.

 

Here is the sample input:-

 

RecordStart_DateEnd_Date
R11-Jun-2110-Jun-21
R25-Jun-218-Jun-21
R315-Jun-2122-Jun-21
R410-Jun-2118-Jun-21
R526-Jun-2130-Jun-21

 

Heres the Holiday List:-

 

Holidays
3-Jun-21
7-Jun-21
15-Jun-21
27-Jun-21
29-Jun-21

 

 

Heres the desired output result:-

 

 

RecordStart_DateEnd_DateNo. Of Holidays
R11-Jun-2110-Jun-212
R25-Jun-218-Jun-211
R315-Jun-2122-Jun-211
R410-Jun-2118-Jun-211
R526-Jun-2130-Jun-212

 

 

Also attaching excel sheets.

3 REPLIES 3
jamielaird
14 - Magnetar

Hey @rohan146 ,

 

Here's a solution based on appending the list of holidays to each date, counting 1 for each holiday date within the range, and summing all the counts:

 

jamielaird_0-1623085322397.png

 

OllieClarke
15 - Aurora
15 - Aurora

Hi @rohan146 

 

Here's my solution:

OllieClarke_0-1623085675446.png

 

apathetichell
18 - Pollux

2021-06-07 (5).png

convert to dates, generate rows, join and summarize.

Labels