Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two-dimensional matrix with interval values

It's been awhile since I've worked with QlikView so I apologize if this is a basic question.  I have sales information I read in from a database like this:

Salesman IDProduct GroupItemSalesCost
0100BDABCDE12456.009670.84
0100BDZXCVB3652.002980.03
0100CM12345102587.0086788.60

And I have a commission matrix read in from a spreadsheet like this:

GM%Sales < $150,000Sales $50,000 - <$100,000Sales $100,000 - < $150,000Sales $150,000 or more
<15%0.50%0.60%0.70%0.80%
15% - <16%0.60%0.70%0.80%0.90%
16% or more0.70%0.80%0.90%1.00%

This is an abbreviated version of the matrix table but you should get the idea.  What I have to do is calculate the commission percentage by taking the salesperson's total sales (regardless of product group) to get the column across the top.  Then take the salesperson's total for that product group, calculate their gross margin percentage and use that to find the row down the matrix.  This example I would use salesperson 0100 total sales ($118,695) to get the column "Sales $100,00 - $150,000" across the top.  Then I would have to calculate the gross margin by product group.  So for Product Group BD my commission multiplier would be 0.90% ($3457.13 profit divided by $16,108 sales = 21.46%).  Product group CM the commission multiplier would be 0.80% ($15,798.40 profit divided by $102,587 sales = 15.4%).

I've tried using IntervalMatch but am having problems since both axis of the matrix are ranges.  I'm not sure how I can accomplish this.  Any thoughts?

Thanks.

0 Replies