Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need Automation that can pick a date from a dataset that fits between a date range

WishIKnewHowToCode
8 - Asteroid

So I get large datasets with lots of transactions, and sometimes I need to find dates within specific date ranges by account number. It would then need to output a list of account numbers with their transaction date that falls in the range.

So for example, I have Account 0001. Starting Date is 1/1/23 Ending Date is 6/7/23

I have a file with lots of transactions within and outside of that range. I need the automation to pick a date from within the file that fits within the range.

I would like to be able to input one excel file containing the list of transaction dates by account number, and another file containing the Starting Date and Ending Date.

I created two test input files. Can anyone help me figure this out? I've tried to find a similar situation but couldn't.

3 REPLIES 3
binuacs
21 - Polaris

@WishIKnewHowToCode One way of doing this

binuacs_0-1674684345985.png

 

WishIKnewHowToCode
8 - Asteroid

@binuacs I'm not exaggerating when I say this literally might save 100 hours of work for just this one client my team is working on. I've been working with your solution to make sure it works, and I think it does. I'm going to review it tomorrow with 1 or 2 other people to make sure it's doing what we need, but I think it's solid.

I've never used this generate row tool before, but basically I think it's just generating every date in between the ranges, and in a brute-force-y kind of way matches to my dates from my dataset. Correct me if I'm wrong on that.

binuacs
21 - Polaris

@WishIKnewHowToCode  you are correct, the Generate row tool generates every date in between the dates, it is basically working like a loop, I think it is not a kind of brute-force match 😊. You can also use the append tool then filter out the records, but the appends tool works like cross-join, so have to be careful when you deal with huge records. I am also attaching the append tool method

 

binuacs_0-1674725682098.png

 

 

Labels
Top Solution Authors