We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Look up value between values in another table

RDF25087
8 - Asteroid

Hi -

 

Okay, I have a table of orders for a customer:

 

Customer 112345678
Total325168421601355267408411

 

1 - 8 represents months. 1 = Jan, etc...

 

I have another table of payment levels:

 

 JanFebMarAprMayJunJulAug
Level 2118100125203188280267133
Level 3245170265311287356321286
Level 4361192321422344498455369
Level 5399212400537498521528444
Level 6425294497600544600679516

 

For each month I need to look up the Total value in table 2 and return which level it has reached and how many more orders are required to reach the next level.

 

So, in the example above for January. The customer has placed 325 orders. This would place them in Level 3. They would require 36 more orders to reach Level 4.

 

So, ultimately, I'd be looking for an output table that looks something like this:

 

 JanFebMarAprMayJunJulAug
Current Level32564 34
Diff. to Next Level36276 143134733

 

Any ideas on how this could be done I'd be very, very grateful!

 

Thanks

RDF

2 REPLIES 2
Prometheus
12 - Quasar

@RDF25087 This was a fun one. Basically, I pivoted both tables so I could join on month, then used the Multi-Row Formula tools to determine level and difference to next level, then pivoted the data again to create the desired output.

Look Up Values.PNG

RDF25087
8 - Asteroid

@PrometheusThank you for the response! I'm glad you found the challenge fun - I shut down my laptop in disgust on Friday as the issue was a huge thorn in my side, so I'm very grateful for your accurate and elegant response!

 

RDF

Labels
Top Solution Authors