Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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

1 Solution

Accepted Solutions
marwen_garwachi
Creator II
Creator II

Try this :

=num(((-3948.41/-39484.08)*100),'############ ###')

Ps: you can also put this format (############ ###) in Numbers format panel.

Hope it will help you.

Marwen

View solution in original post

16 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

use the num function to round to as many decimals as you require

e.g.

num(

(-3948.41/-39484.08)*100

,'#.000000000000000')

Not applicable
Author

HI Sonali,

If it is in dash borad you need to check the property called Sort in that you can change how many decimals you need.

marcus_malinow
Partner - Specialist III
Partner - Specialist III

n.b with 15 dp, as in my example above, you'll get a result of 10.000005065332660

Not applicable
Author

Ya correct I think Num function works upto 14 decimal places.

I tried the same  upto 14 decimals =num((-3948.41/-39484.08)*100,'#,##0.00000000000000') and got 10.00000506533266

and if you give 15 decimals =num((-3948.41/-39484.08)*100,'#,##0.000000000000000') gives 10.000005065332660 but what I want is 10.0000050653327

marwen_garwachi
Creator II
Creator II

Try this :

=num(((-3948.41/-39484.08)*100),'############ ###')

Ps: you can also put this format (############ ###) in Numbers format panel.

Hope it will help you.

Marwen

Not applicable
Author

Thank you very much... It's working

marcus_malinow
Partner - Specialist III
Partner - Specialist III

So try to 13 decimals

You're welcome

Not applicable
Author

HI Marwen,

still some issue is there.

If I am trying  =num((546.42/1787.66)*100,'###############') in text object I am getting the result 30.5662150520793 but if I am using the same thing in the script I am getting the result as 30.566215052079.

The same Num function works differently in script and in text object.

What I want is if I apply the same thing in script and load this then also the result should be 30.5662150520793.

Please advice.

marwen_garwachi
Creator II
Creator II

can you publich a sample file ?

Regards

Marwen