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 platformindependent trueChart expressions and platformspecific 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 
trueChart (dimensions & measures) 

All dynamic fields (like title, tooltip, icon, layout, style, color, action parameters, …) 
platform specific* 
Cell settings
Area  Section  Group  Field  Expression type 

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) 

General 
Name 
trueChart (variables) 

Display condition 
platform specific* 

First value 
Label 
trueChart (variables) 

Rest value 
Label 
trueChart (variables) 

Total value 
Label 
trueChart (variables) 

General 
Name 
trueChart (variables) 

Display condition 
platform specific* 

Expression 
Applies to 
trueChart (dimensions) 

Formula 
trueChart (dimensions & measures) 

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
Change expression type
If there is the possibility to change the type within the expressions (platformspecific or trueChart internal), this can be done by using the dropdown 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 dropdown 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 

 
Subtraction 

* 
Multiplication 

/ 
Division 

** 
Power of 

( 
Left parenthesis 

) 
Right parenthesis 

% 
ROI in percent 

%O 
Percent 

Comparison
Operator  Description  Example 

< 
Less 

<= 
Less or equal 

== 
Equal 

<> 
Unequal 

>= 
Bigger or equal 

> 
Bigger 

Logical
Operator  Description  Example 

AND 
Logical conjunction AND 

OR 
Logical conjunction OR 

$(AND:) 
Logical conjunction AND as list 

$(OR:) 
Logical conjunction OR as list 

trueChart (variables) expressions
You can insert a variable by making selections from the General section at the righthand side of the expression editor dialog.

Select a variable from the Variable dropdown list to insert it.
trueChart (dimensions) expressions
This expression type contains all function has all functions of the variables expression type described above.
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 righthand side of the expression editor dialog.
Do the following:

Optional: If you want to specify an access type due to the dimensional values select the type from the Type dropdown list. The selected value is only applied in connection with the selection of a dimension in the following dropdown 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])


Select a dimension from the Dimension dropdown list. The value 'Dimension' represents the default/first dimension in the current data context.

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.
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 righthand side of the expression editor dialog.
Do the following:

Optional: If you want to specify an aggregation type due to the measure values selects the type from the Aggregation dropdown list. The selected value is only applied in connection with the selection of a measure in the following dropdown 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


Select a measure from the Measure dropdown list.

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.
Inserting an expression using Fields
You can insert an expression by making selections from the Fields section at the righthand side of the expression editor dialog.
Do the following:

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 dropdown list.

Select a field from the Field dropdown list.

Select the aggregation function you want to use from the following dropdown list.

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 righthand side of the expression editor dialog.

Select a variable from the Variable dropdown 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])'. 