trueChart Help

Dynamic content and interactions through expressions

trueChart offers in many places the possibility to dynamically design content and interaction behavior. For this purpose, expressions can be used in different places.

Depending on the platform used, different expression types can be used in trueChart. In general, a distinction can be made between platform-independent trueChart expressions and platform-specific expressions (currently only Qlik Sense). In a particular platform does not support expressions (like Microsoft PowerBI) trueChart only provides trueChart expressions.

Thus in Qlik Sense within the button type or with alternative cell contents the powerful Sense Expressions or the trueChart expression logic can be used directly.

In the following, you will find an overview of the dynamic settings and an overview of the functionality of the trueChart Expression Editor.

Dynamic setting options

trueChart offers expression support in the following application areas

Cell types

Type Field Expression type

URL

URL

trueChart (dimensions & measures)

Button

All dynamic fields (like title, tooltip, icon, layout, style, color, action parameters, …​)

platform specific*

Cell settings

Area Section Group Field Expression type

Cell

Multiple (cell) contents

Contents

Condition

platform specific*

Dimensions

Filter

Applies to

trueChart (dimensions)

Condition

trueChart (dimensions & measures)

Gap

Condition

trueChart (dimensions)

Measures

Values Show

Applies to [List]

trueChart (dimensions)

Condition [List]

trueChart (dimensions & measures)

Data

Dimensions

General

Name

trueChart (variables)

Display condition

platform specific*

First value

Label

trueChart (variables)

Rest value

Label

trueChart (variables)

Total value

Label

trueChart (variables)

Measures

General

Name

trueChart (variables)

Display condition

platform specific*

Expression

Applies to

trueChart (dimensions)

Formula

trueChart (dimensions & measures)

Rule

Applies to

trueChart (dimensions)

Condition

trueChart (dimensions & measures)

Scaling

trueChart (variables)

Unit

trueChart (variables)

Decimals

trueChart (variables)

platform specific: Qlik Sense or trueChart expressions as fallback

trueChart Expression Editor

General

expression editor trueChart

Change expression type

If there is the possibility to change the type within the expressions (platform-specific or trueChart internal), this can be done by using the drop-down menu in the lower left corner of the editor.

Result preview

If available, the result of the expression is displayed below the expression input field. In case expressions are executed on a list of values (such as dimension values), the first positive result is output as the result.

Execution duration

The execution time of the expression is displayed to the right of the result preview. This information can be used to analyze and optimize expressions.

Insert Operators

In general, trueChart offers the possibility to use a number of mathematical, comparative and logical expressions. By selecting an appropriate entry in the respective drop-down list in the "Operators" area, an operator can be inserted at the current position of the cursor.

The following operators are supported:

Mathematical

Operator Description Example

+

Addition

x + y

-

Subtraction

x - y

*

Multiplication

x * y

/

Division

x / y

**

Power of

x ** y

(

Left parenthesis

)

Right parenthesis

%

ROI in percent

(x + y) / y * 100

%O

Percent

x / y * 100

Comparison

Operator Description Example

<

Less

x < y

<=

Less or equal

x <= y

==

Equal

x == y

<>

Unequal

x <> y

>=

Bigger or equal

x >= y

>

Bigger

x > y

Logical

Operator Description Example

AND

Logical conjunction AND

(Expression A) AND (Expression B)

OR

Logical conjunction OR

(Expression A) OR (Expression B)

$(AND:)

Logical conjunction AND as list

$(AND:2,2,1) == 2 → false

$(AND:3,3,3) == 3 → true

$(OR:)

Logical conjunction OR as list

$(OR:1,2,3) == 4 → false

$(OR:1,2,3) == 3 → true

trueChart (variables) expressions

You can insert a variable by making selections from the General section at the right-hand side of the expression editor dialog.

expression editor trueChart variable

  1. Select a variable from the Variable drop-down list to insert it.

trueChart (dimensions) expressions

This expression type contains all function has all functions of the variables expression type described above.

expression editor trueChart dimension

The following functions are also available for this type:

You can insert a dimension based expression by making selections from the General section at the right-hand side of the expression editor dialog.

Do the following:

  1. Optional: If you want to specify an access type due to the dimensional values select the type from the Type drop-down list. The selected value is only applied in connection with the selection of a dimension in the following drop-down and inserted together with the dimension then. Available types are:

    • No restriction: No impact

      $(DIMENSION) OR $(D0100,POSITION; [dimension name]) // just the dimension
    • Position: Use of a dimension value from a specific position depending on the order of the values within the dimension.

      $(DIMENSION,POSITION) > 4 OR $(D0100,POSITION; [dimension name]) == 2
    • First: Use the first dimension value

      $(DIMENSION,FST) OR $(D0100,FST; [dimension name])
    • Rest: Use the dimension value, marked as rest. This value depends on the respective dimension definition in the data source (BI platform) or in the trueChart data context and can therefore not be present. In this case, this expression does not return anything.

      $(DIMENSION,RST) OR $(D0100,RST; [dimension name])
    • Total: Use the dimension value, marked as a total. This value depends on the respective dimension definition in the data source (BI platform) or in the trueChart data context and can therefore not be present. In this case, this expression does not return anything.

      $(DIMENSION,TTL) OR $(D0100,TTL; [dimension name])
  2. Select a dimension from the Dimension drop-down list. The value 'Dimension' represents the default/first dimension in the current data context.

  3. After selection, the dimension and the previous optional selected type will be inserted in the expression input field.

trueChart (dimensions & measures) expressions

This expression type contains all function has all functions of the expression types described above.

expression editor trueChart dimension measure

The following functions are also available for this type:

You can insert a measure based expression by making selections from the General section at the right-hand side of the expression editor dialog.

Do the following:

  1. Optional: If you want to specify an aggregation type due to the measure values selects the type from the Aggregation drop-down list. The selected value is only applied in connection with the selection of a measure in the following drop-down and inserted together with the measure then. Available types are:

    • No aggregation: No impact

      $(K01; [measure name]) // just the first measure
    • Sum: Calculates the sum of corresponding measure.

      $(K01,SUM; [measure name]) //sum of the first measure in current data context
    • Average: Calculates the average of corresponding measure.

      $(K03,AVG; [measure name]) //Average of the third measure in current data context
    • Minimum: Calculates the minimum of corresponding measure.

      $(K05,MIN; [measure name]) //Minimum of the fifth in current data context
    • Maximum: Calculates the maximum of corresponding measure.

      $(K035,MAX; [measure name]) //Maximum of the third measure in current data context
  2. Select a measure from the Measure drop-down list.

  3. After selection, the measure and the previous optional selected aggregation will be inserted in the expression input field.

platform specific: Qlik Sense expressions

trueChart provides an easy to use expression editor for creation of sense expressions. Basic and advanced information about writing Qlik Sense expressions can be found in the Qlik Sense expression documentation.

expression editor qlik sense

Inserting an expression using Fields

You can insert an expression by making selections from the Fields section at the right-hand side of the expression editor dialog.

Do the following:

  1. If you want to limit the available fields to those from a particular table in your data model, select a table from the Filter by table drop-down list.

  2. Select a field from the Field drop-down list.

  3. Select the aggregation function you want to use from the following drop-down list.

  4. Click Insert to insert the field and the function into the expression field.

If you do not select an aggregation function, only the field will be inserted into the expression. Clauses can only be added if you select an aggregation function.

Inserting a variable using Variables

You can insert a variable by making selections from the General section at the right-hand side of the expression editor dialog.

  1. Select a variable from the Variable drop-down list to insert it.

For variables, only the name is inserted. For sense expression logic it may be necessary to surround the variable name with '$([your variable])'.