Decimal Values In Qlik Sense And QlikView - June 2019 and later
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.
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.
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.
NOTE1: The leading zero in decimal values smaller than 1 is not included in the 15 digit precision. NOTE2: Values smaller than 100 have more than 15 digits in the decimal part and therefore these values can not be completely revealed.