Introduction
Most Widgets have configuration fields that require to generate a single number for each corresponding shape in the Widget.
Examples :
- Chart : the chart line Y position of each point
- TreeMap : the rectangle relative size for each rectangle
- …
Since data is grouped in a Widget query (“for each point”, “for each rectangle”, …), numerical fields must be aggregated in order to give a single number for each Widget “shape”.
This operation is done with an aggregation function.
For Measure fields
For Measure fields (numbers), the following aggregation functions are available : Avg
, Count
, Distinct Count
, Max
, Min
, Sum
, STDev
, STDevP
, Var
, VarP
.
These functions absolutely require a number (except Count
and Distinct Count
, see below).
They translate to the corresponding functions in your source data engine (SQL, SQLite, … depending on your Data Source). Please refer to the corresponding documentation if you need to understand better these functions.
For Dimension fields
Dimension fields (strings, dates, booleans) can also be used to generate numbers for Widget queries.
The following aggregation functions are available : Count
, Distinct Count
.
These functions accept all data types.
They translate to the corresponding functions in your source data engine (SQL, SQLite, … depending on your Data Source). Please refer to the corresponding documentation if you need to understand better these functions.
For Aggregated Expressions
(see corresponding chapter)
Aggregated Expressions already guarantee they provide a single number, and no aggregation function can be used on top of them.
In order to use an Aggregated Expression as a number field, select “Value of” instead of an aggregation function :
Post your comment on this topic.