7 Replies Latest reply: Aug 21, 2014 6:14 AM by Georgia Psyllidou

# Improving the accuracy of calculations

Hi,

I would like to have better accuracy of Qlik calculations and I am wondering if this is possible and what is the best way to go...

Here's the case.

I have a metric x that is calculated with (A-B)/C.

A, B, C are also calculated values.

When I get A, B, C calculated values separately from Qlik and calculate x offline (Excel, calculator, manually) I get value x1 (in % with precision >=3).

When I  ask Qlik to do the x calculation it returns a value x2  (in % with precision >=3)..

x1 and x2 can be as different as 3% which is not suitable for my case: I need x1 and x2 to agree on the second decimal at least.

Any ideas of how I can have x2 calculated more accurately by Qlik?

thx

Georgia

• ###### Re: Improving the accuracy of calculations

Not sure if I understood right. Have you checked the number tab (of a chart)? You can set precision for metrics there.

• ###### Re: Improving the accuracy of calculations

indeed I have checked that and all it does is increasing the number of decimals ie

if initial number is 15,34% (x2) this can get me to 15,33456...%

However I want my calculation to return something like 15,42% (x1 calculated offline with A,B, C also in Qlik, so same basis) which cannot be fixed with that.

thx

G

• ###### Re: Improving the accuracy of calculations

hi, Georgia

If your are using this calculation in graph or table go properties then number tab

Regards

• ###### Re: Improving the accuracy of calculations

indeed I have checked that and all it does is increasing the number of decimals ie

if initial number is 15,34% (x2) this can get me to 15,33456...%

However I want my calculation to return something like 15,42% (x1 calculated offline with A,B, C also in Qlik, so same basis) which cannot be fixed with that.

thx

G

• ###### Re: Improving the accuracy of calculations

Dear G

can you give me the value of

Regards

• ###### Re: Improving the accuracy of calculations

May be you need to use round function in your expression....

=round(15.33456,0.2)

=15.4%