Alteryx Designer Desktop Discussions

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

Vlookup coiumn from a date range based on two input files

bryanmac_92
7 - Meteor

Hello,

 

I have two input files. Both files shown below are truncated to show an example as there are over 1000 rows each. 

I am having trouble trying to fill in the blanks cells in Effective_Session, not sure how to go about it - whether to use a find and replace tool or something else.

It could run when I tried the find and replace tool, as it gave me an empty dataset.

 

The goal is to fill in the blank Effective_Session column by referencing the Date. If the Date [File 1] is within the range of the Start Date [File 2] and End Date [File 2], then Session [File 2] will be populated in Effective_Session column [File 1].

Usually the Date is varied and not just one day.

 

File 1

Date Effective_Session
1/20/2023 
1/20/2023 
1/20/2023 
1/20/2023 
1/20/2023 
1/20/2023 
1/20/2023 
1/20/2023 

 

File 2

SessionStart DateEnd Date
2023118/29/202210/23/2022
20231510/24/20221/8/2023
2023211/9/20233/5/2023
2023253/6/20234/30/2023
2023315/1/20236/25/2023

 

 

Goal

Date Effective_Session
1/20/2023202321
1/20/2023202321
1/20/2023202321
1/20/2023202321
1/20/2023202321
1/20/2023202321
1/20/2023202321
1/20/2023202321

 

Thanks!

7 REPLIES 7
ShankerV
17 - Castor

Hi @bryanmac_92 

 

Quick response to overcome the issue, when you have done Vlookup it didnt work as the date are not in Alteryx format.

We need to convert to date format and do the vlookup.

 

Let me know if you need to me to build a workflow to showcase how it works.

 

 

Felipe_Ribeir0
16 - Nebula

Hi @bryanmac_92 

 

One way of doing this:

 

Felipe_Ribeir0_1-1674175686363.png

 

 

ShankerV
17 - Castor

Hi @bryanmac_92 

 

Please find the expected output.

 

ShankerV_0-1674175939935.png

 

ShankerV
17 - Castor

Hi @bryanmac_92 

 

Another way by eliminating 2 other tools.

 

ShankerV_0-1674176064556.png

 

bryanmac_92
7 - Meteor

In looking at the Date column in seems that there are lots of cells that have this format: 2023-01-19.

What would be the workflow with this applied?

ShankerV
17 - Castor

Hi @bryanmac_92 

 

The date is in Alteryx format YYYY-MM-DD (2023-01-19) to perform the calculations.

 

Edit: All the date's in the input are converted to Alteryx date format and then it is used to generate the output.

 

binuacs
20 - Arcturus

@bryanmac_92 One way of doing this,if the Dates are in a proper format.

 

binuacs_0-1674201399790.png

 

Labels