Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MK_QSL
MVP
MVP

InvervalMatch

What am I doing wrong in below?

=======================================

Purchase:

Load * Inline

[

  Supplier, Purchase

  ABC, 125

  DEF, 115

];

Discount:

Load * Inline

[

  Supplier, From, To, Discount

  ABC, 100, 119, 2%

  ABC, 120, 129, 3%

  ABC, 130, 150, 4%

  DEF, 110, 119, 4%

  DEF, 120, 129, 6%

  DEF, 130, 150, 8%

];

INNER JOIN IntervalMatch (Purchase,Supplier) Load From, To, Supplier Resident Discount;

Join (Purchase) Load * Resident Discount;

Drop Table Discount;

Drop Fields From,To;

===========================================

1 Solution

Accepted Solutions
Gysbert_Wassenaar

That's the result I see here using your script. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

No idea. The resulting table contains exactly the data I would expect. Can you explain what you think is wrong?


talk is cheap, supply exceeds demand
Not applicable

Seems to work fine. Whats the issue at hand?

MK_QSL
MVP
MVP
Author

Purchase Table is the Actual Purchase for this Year

Discount Table is showing Discount % at variable range.

I need to find out currently where we are based on Current Purchase.

i.e.

Supplier, Purchase, %Discount

ABC, 125, 3%

DEF, 115, 4%

Gysbert_Wassenaar

That's the result I see here using your script. See attached qvw.


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP
Author

Don't know why it was not giving me desired result previously !!!

Thanks...