Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

Decimal Values In Qlik Sense And QlikView - June 2019 and later

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
ToniKautto
Employee
Employee

Decimal Values In Qlik Sense And QlikView - June 2019 and later

Last Update:

Aug 22, 2024 5:02:51 AM

Updated By:

Sonja_Bauernfeind

Created date:

Sep 18, 2020 12:22:44 AM

QlikView and Qlik Sense use the same underlying Qlik Indexing (QIX) engine, which stores all decimal values as floating-point values, based on the IEEE 754 double-precision floating-point standard. Floating point value is a common way to handle decimal values in computers because it allows for very efficient processing of decimal values and thereby gives good calculation performance.  

The principle is to store the value as an integer part, called mantissa, and then define the decimal position by an exponent. 

servlet (1).png

A floating-point value is always stored with a static length. 64-bit environments allow for a 17 digit mantissa, which means that a value like 1.75 is stored as 1.7500000000000000. 

Floating-point values are, by definition, not exact values, and the stored value can vary on the last decimal digits. For example, the value 1.75 can be rounded upwards or downwards, but still represent the same decimal value.

1.7500000000000001
1.7500000000000000
1.7499999999999999

The variation on the last decimal digit can occur at any time when the value is being processed. This also includes when a value is loaded and stored, as well as when a calculation or a modification of the value is performed. 

This means that the last two (17-15=2) digits of the decimal value are subject to rounding, and the last two digits can therefore fluctuate during processing. For this reason, decimal values should only be presented with max 15 digits, including integer and decimal parts.  

Num() function can be used to format a loaded value to present within the 15 digit precision. It is possible to present more than 15 digits by statically expanding the number of decimal digits, which means all 17 stored digits can be revealed. It is not recommended to show more than 15 digits to the end-user as this information can be misleading.

servlet.png

NOTE 1: The leading zero in decimal values smaller than 1 is not included in the 15 digit precision.
NOTE 2: Values smaller than 100 have more than 15 digits in the decimal part and therefore these values can not be completely revealed. 

References 

Labels (1)
Version history
Last update:
‎2024-08-22 05:02 AM
Updated by: