Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jim_chan
Not applicable

How to create intervalmatch

Hi guys,

I need to create a intervalmatch for employee Yearly Sales Target.

So i have created Inline Data

Interval_Sales_Target_Percentage_Grade:

load * inline

[

Year,Min_Sales ,Max_Sales,Grade

2015,85.01,95, Average

2015,95.01,100,Good

2015,100.01,999.9,Excellent

];

and

IntervalMatch:

IntervalMatch (Sales)

Load distinct Min_Sales, Max_Sales

Interval_Sales_Target_Percentage_Grade;

Problem is... i think the intervalmatch should not be "Sales". My orders and sales_target table is 2 diff table. But i think i need to create an expression, such as (total_sales/target)*100 as percentage_achieved. Then in my intervalmatch table, i should interval match(percentage_achieved).

both tables rite now are linked with orders_key.

target.jpg

Rgds

Jim

Tags (1)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: How to create intervalmatch

You could use a mapping table approach (using MAPPING LOAD prefix and ApplyMap() ) or a JOIN to create a single table with Total_Sales and Target values. Then do a resident LOAD to create your percentage column and use IntervalMatch() to match against your grades (maybe using year as key field in the IntervalMatch() extended syntax?).

1 Reply
swuehl
Not applicable

Re: How to create intervalmatch

You could use a mapping table approach (using MAPPING LOAD prefix and ApplyMap() ) or a JOIN to create a single table with Total_Sales and Target values. Then do a resident LOAD to create your percentage column and use IntervalMatch() to match against your grades (maybe using year as key field in the IntervalMatch() extended syntax?).