# New to QlikView

Discussion board where members can get started with QlikView.

New Contributor

## User defined function or expression?

Hi,

I'm quite new to QlikView and I'm facing currently following problem - there is a list of car dealers, for each of them I calculate let's say 3  KPIs, like "% of total sales", "% of bad loans", "% of fraud cases".

Next step  is to calculate deviation of each KPI from the average value for all the dealers. If the deviation is greater than 20%, KPI gets note=4, if > 15% then gets note=3, if > 10% than note=2 else note=1.
So before final calculation I have following variables:

total_sales_note = 3;
fraud_cases_note = 1;

Based of these 3 variables I would need to calculate so called "Dealer grading note" which has also values 1 to 4. It is calculated like following:

where total_sales_weight = 0.5, bad_loans_weight = 0.3, fraud_cases_weight = 0.2 (fixed values)

How you would implement it in QlikView? I mean the last step, calculation of dealer_grading_note / dealer_grading. At the end, it should be shown in the textbox
I was trying to write own function, but I have still too less experience .

1 Solution

Accepted Solutions
Highlighted
Valued Contributor

## Re: User defined function or expression?

Hello!

You may use this sketch for picking some ideas how dealer's note can be implemented.

I've left Web View mode switched on in the attached file. You can switch it off in View panel.

2 Replies
Highlighted
Valued Contributor

## Re: User defined function or expression?

Hello!

You may use this sketch for picking some ideas how dealer's note can be implemented.

I've left Web View mode switched on in the attached file. You can switch it off in View panel.

New Contributor

Thank you!