Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Exchange Rate match when date is in date range

LinhNguyen
8 - Asteroid

Hi,

 

I have a file of sales information and another file of exchange rate with effective date range.

For the sales table, if the invoice date is within the effective date range and the currency code match the currency conversion table, I'll use that exchange rate to convert my sales to USD.

 

Does anyone know how I can do this effectively? There's no rule to setting up valid dates. That's just what another department gave me every time they have a change.

Sales table:

Invoice dateCurrency codeAmount
9/28/2019USD350
9/1/2019CNY235
10/1/2019AED351

 

Currency conversion table:

0.27229AED09/27/201910/2/2019
0.01747ARS09/27/201910/2/2019
0.24023BRL09/27/201910/2/2019
0.75442CAD09/27/201910/2/2019
1.00778CHF09/27/201910/2/2019
0.14034CNY09/27/201910/2/2019
0.27229AED08/30/20199/26/2019
0.01709ARS08/30/20199/26/2019
0.24075BRL08/30/20199/26/2019
0.75199CAD08/30/20199/26/2019
1.01141CHF08/30/20199/26/2019
0.13985CNY08/30/20199/26/2019

 

Thank you!

2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi @LinhNguyen ,

 

I think, the easiest solution will be to create a table using thre Generate Rows tool. This table should have one entry for each day and currency, so you can join by date and currency with the invoice table. See attached workflow how to create this join table.

 

Best regards

 

Roland

LinhNguyen
8 - Asteroid

Thank you!

Labels
Top Solution Authors