Dynamic Cultures
  • 16 Apr 2024
  • 2 Minutes to read
  • Dark
    Light

Dynamic Cultures

  • Dark
    Light

Article summary

General

Dynamic cultures apply when Mail & Deploy reads numeric or date-time values from Qlik Sense tables and needs to interpret them correctly.

Description

Every table cell in Qlik Sense has (potentially) two values: a numeric one and a text value.

Example: The numeric value of a table cell could be 1234; its text value, however, is 1.234,00, because the text value contains the formatted number.

When reading data from a Qlik Sense table, Mail & Deploy needs to read both the numeric and the textual value correctly. It can only do that, if it knows the thousands and decimal separator of the format string that describes how a number is represented as text. By Default, Mail & Deploy uses the ThousandSep and DecimalSep variables you can set in the load script of a Qlik Sense app.

Qlik Sense Load Script

SET ThousandSep=',';
SET DecimalSep='.';

The Problem

Sometimes Qlik Sense apps are built in such a way that there is no global setting for thousands and decimal separators, because they change dynamically depending on the selected data.

Example: In most cases Qlik Sense variables are used to store format strings or currently applicable thousands and decimal separators. These variables are then used with any of the number formatting functions of Qlik Sense to correctly display the textual representation of numbers or date-times.

In such cases, Mail & Deploy cannot rely on the default thousands and decimal separators and therefore some numbers or date-times may only appear as text when exported to a report document.

Example: You export a table to Microsoft Excel and you notice that the number is only stored as text in the cells of the outputted table.

The Solution

Qlik Sense datasources therefore have three properties that can be used to dynamically feed Mail & Deploy with information about the currently applicable thousands and decimal separators:

Name

Description
Has Dynamic CultureWhen disabled, Mail & Deploy will always use the default thousands and decimal separators defined by the ThousandSep and DecimalSep variables in the load script. If enabled, you can specify the separators to use (see below).
Dynamic Thousands SeparatorA Qlik Sense expression that returns the currently applicable thousands separator used within the Qlik Sense app. Typically this will be the reference to a variable of the Qlik Sense app. This property is only applicable if Has Dynamic Culture is enabled.
Dynamic Decimal SeparatorA Qlik Sense expression that returns the currently applicable decimal separator used within the Qlik Sense app. Typically this will be the reference to a variable of the Qlik Sense app. This property is only applicable if Has Dynamic Culture is enabled.

Was this article helpful?