Alteryx Designer Desktop Discussions

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

Join on Generated Dates

elclark
8 - Asteroid

Hello,

I have the below two tables, what I'm trying to do is combine the two tables based on state, city, and date to bring in the approved lodging rate into Table B (see Desired Output). I tried doing a formula and generate rows so it would give me all dates between the season begin and end timeframe but I'm having issues when the dates go from one year to the next (example October to May). The year doesn't necessarily matter, I'm really just comparing based on Month and Day. Any help would be much appreciated.

 

Table A

STATECITYSEASON BEGINSEASON ENDAPPROVED LODGING RATE
AZPhoenixOctober 1May 31$151
AZPhoenixJune 1August 31$96
AZPhoenixSeptember 1September 30$151

 

Table B

Booking DateHotel StateHotel CityBooked Rate
2/18/2022AZPHOENIX$130

 

Desired Output

Book DateHotel StateHotel CityBooked RateAPPROVED LODGING RATE
2/18/2022AZPHOENIX$130$151
9/05/2022AZPHOENIX$180$151
07/15/2022AZPHOENIX$100$96
2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

@elclark ,

 

please try this macro out for size:

 

https://community.alteryx.com/t5/Public-Community-Gallery/CReW-Generate-Date-Rows/ta-p/926163

 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Qiu
21 - Polaris
21 - Polaris

@elclark 

There are many DateTime Tools and hope you dont mind.

For the issue  (example October to May), I added one year to Season End if Season End is smaller than Season Begin given they are in the same year.
And I think you are missing some input data in for Table B. Kindly check.

0831-elclark-1.JPG0831-elclark-2.JPG

Labels