Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Approximate match

johneodell
8 - Asteroid

I thought I had this solved but testing proved otherwise. I am trying to do an average of three days of pricing indexes for cargo voyages (1 day previous to the voyage, the voyage day, and 1 day post voyage). The issue I am having is that my voyage dates do not always line up with the dates that the index is published (there is no pricing info published on weekends/holidays). So I may have a list that looks like this:

 

johneodell_0-1579533511231.png

 

If I have a voyage that takes place on 12/26, I would just use the pricing for 12/23, 12/24, and 1/2 for the appropriate index.  In Excel I just use an INDEX MATCH MATCH with an approximate match instead of an exact match so my 12/26 voyage will return as 12/24 for the average calculation. 

 

How can I reproduce this in Alteryx?

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @johneodell,

 

Would this help?

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

johneodell
8 - Asteroid

Thanks @afv2688 

 

That would work if I were entering the dates one at a time but I'm matching an entire month's data at once.

afv2688
16 - Nebula
16 - Nebula

Hello @johneodell ,

 

This should work now

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

johneodell
8 - Asteroid

@afv2688 ,

 

Thank you so much!! I noticed that dates with an exact match weren't calculating correctly so I had to change the filter from Diff = 0 to Diff <= 0, but other than that, this workflow accomplished what I needed. Thank you so much for you expertise and help! Greatly appreciated!

Labels