Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Approximate match

Highlighted
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?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

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

Highlighted
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.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

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

Highlighted
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