Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AVG Aggregation

Hi community,

What is the rule or the function of AVG agregation?

Thanks

1 Reply
Not applicable
Author

When you use expression charts, you can calculat a total of sum rows!!!

aggr ( [ distinct | nodistinct ] [{set_expression}] expression {, dimension} )

Returns a set of values of expression calculated over dimensions. The result can be compared to the expression column of a 'local chart', evaluated in the context where the aggr function resides. Each dimension must be a single field. It cannot be an expression (calculated dimension).

If the expression argument is preceded by the nodistinct qualifier, each combination of dimension values may generate more than one return value, depending on underlying data structure. If the expression argument is preceded by the distinct qualifier or if no qualifier is used at all, each combination of dimension values will generate only one return value.

By default, the aggregation function will aggregate over the set of possible records defined by the selection. An alternative set of records can be defined by a set expression.

By using this function in calculated dimensions it is possible to achieve nested chart aggregation in multiple levels. See also Nested aggregation and related issues.

When used in chart expressions it is possible to achieve sum-of-rows totals in a pivot table.

Examples:

aggr( sum(Sales), Country )

aggr( nodistinct sum(Sales), Country )

aggr( sum(Sales), Country, Region )

count( aggr( sum(Sales), Country ))