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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Division Issues


Hello Everybody,

I am facing issue in division and decimal values.

In a text file I tried
=(-3948.41/-39484.08)*100 and the result is 10.000005065333

But if you try the samething manually in calculator you will get the result 10.0000050653327

The thing is QlikView is rounding off the last two values i.e 27 to 3.

Could any one please tell me how to get the correct value if we calculate it mannually  .

Thanks In Advance

Sonali

Message was edited by: Sonali Singh

16 Replies
Not applicable
Author

Hi Marwen,

I have attached the sample. Could you please look into this and tell me why the same Num() works differently in text object and in the loaded scipt.

The field name is Risk1%.

Thanks

Sonali

marwen_garwachi
Creator II
Creator II

The result should be 30.5662150520792 (with 13 decimals) or 30.56621505207925 (with 14 Decimals) .

Here's the Qvw File attached.

Not applicable
Author

Hi Marwen,

Thanks for the reply.

My requirement is something different.

The requiremnt is the sum of risk1% should be exact 100.

30.5662150520793+37.4567870847924+31.9769978631283= 100

But if you calculate 3,056.62150520792+3,197.699786312833+745.67870847924=9,999.99999999999

In QlikView if I am doing the partial sum it's giving me the total as 100.

But as I am storing into a text file there it's not rounding off the value and it's giving the result as 9,999.99999999999.

Please advice.

Thanks

Sonali

marwen_garwachi
Creator II
Creator II

I'm Sorry Dude, but i've Checked again and the result was always 100

Check the sample file joined .

Regards

Marwen

Not applicable
Author

Thanks for your time.

what you have done is correct but if you add the field 'Risk Code' and then if you calculate the sum the result will not be 100.

PolicyPolicy SectionPolicy VersionRisk Codesum(Risk%)Sum(Risk1%)
DX143906114AP30.5662150520793056.6215052079
DX143906114L331.9769978631283197.6997863128
DX143906114H337.4567870847923745.6787084792
99.9999999999999999.9999999999
marwen_garwachi
Creator II
Creator II

Strange ! in my sample File it gives 100

Excel Check :

sum(Risk%)sum(Risk1%)
30,56621505207923056,6215052079200
37,45678708479243745,6787084792400
31,97699786312833197,6997863128300
100,000000000000010000,0000000000000

Not applicable
Author


Hi,

As I told you if you use partial sum or total in the chart properties it's giving total as 100 but if you calculate it manually it's not 100.

305,662,150,520,792+374,567,870,847,924+319,769,978,631,283=999,999,999,999,999