Skip to main content Skip to complementary content

Number interpretation

When you load data containing numbers, currency, or dates, it will be interpreted differently depending on whether the data type is defined or not. This section describes how data is interpreted in the two different cases.

Data with type information

Fields containing numbers with a defined data type in a database loaded using ODBC will be handled by Qlik Sense according to their respective formats. Their string representation will be the number with an appropriate formatting applied.

Qlik Sense will remember the original number format of the field even if the number format is changed for a measure under Number formatting in the properties panel.

To learn more about the properties panel, see Properties panel.

The default formats for the different data types are:

  • integer, floating point numbers: the default setting for number
  • currency: the default setting for currency
  • time, date, timestamp: ISO standard formatting

The default settings for number and currency are defined using the script number interpretation variables or the operating system settings (Control Panel).

For more information, see Number interpretation variables.

Data without type information

For data without specific formatting information from the source (for example, data from text files or ODBC data with a general format) the situation becomes more complicated. The final result will depend on at least six different factors:

  • The way data is written in the source database
  • The operating system settings for number, time, date and so on. (Control Panel)
  • The use of optional number-interpreting variables in the script
  • The use of optional interpretation functions in the script
  • The use of optional formatting functions in the script
  • The number formatting controls in the document

Qlik Sense tries to interpret input data as a number, date, time, and so on. As long as the system default settings are used in the data, the interpretation and the display formatting is done automatically by Qlik Sense, and the user does not need to alter the script or any setting in Qlik Sense.

By default, the following scheme is used until a complete match is found. (The default format is the format such as the decimal separator, the order between year, month and day, and so on, specified in the operating system, that is, in the Control Panel, or in some cases from the special number interpretation variables in the script.

Qlik Sense will interpret the data as:

  1. A number in accordance with the default format for numbers.
  2. A date according to the default format for date.
  3. A timestamp according to the default format for time and date.
  4. A time according to the default format for time.
  5. A date according to the following format: yyyy-MM-dd.
  6. A time-stamp according to the following format: YYYY-MM-DD hh:mm[:ss[.fff]].
  7. A time according to the following format: hh:mm[:ss[.fff]].
  8. Money according to the default format for currency.
  9. A number with '.' as decimal separator and ',' as thousands separator, provided that neither the decimal separator nor the thousands separator are set to ','.
  10. A number with ',' as decimal separator and '.' as thousands separator, provided that neither the decimal separator nor the thousands separator are set to ‘.'.
  11. A text string. This last test never fails: if it is possible to read the data, it is always possible to interpret it as a string.

When loading numbers from text files, some interpretation problems may occur, for example, an incorrect thousands separator or decimal separator may cause Qlik Sense to interpret the number incorrectly. The first thing to do is to check that the number-interpretation variables in the script are correctly defined and that the system settings in the Control Panel are correct.

When Qlik Sense has interpreted data as a date or time, it is possible to change to another date or time format in the properties panel of the visualization.

Since there is no predefined format for the data, different records may, of course, contain differently formatted data in the same field. It is possible for example, to find valid dates, integers, and text in one field. The data will therefore, not be formatted, but shown in its original form.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!