Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Avg

Hi,

How the Avg in trendline is getting calculated ? Anyone can give the formula

2 Replies
Not applicable
Author

Source: Qlikview Help

Avg([{set_expression}] [ distinct | total [<fld { , fld } >]] expression )

Returns the aggregated average of expression or field iterated over the chart dimension(s).

Expression must not contain aggregation functions, unless these inner aggregations contain the total qualifier. For more advanced nested aggregations, please use the aggr function in combination with calculated dimensions.

If the word distinct occurs before the function arguments, duplicates resulting from the evaluation of the function arguments will be disregarded.

If the word total occurs before the function arguments the calculation will be made over all possible values given the current selections but disregarding the chart dimension variables.

The total qualifier may be followed by a list of one or more field names within angle brackets. These field names should be a subset of the chart dimension variables. In this case the calculation will be made disregarding all chart dimension variables except those listed, i.e. one value will be returned for each combination of field values in the listed dimension fields. Also fields which are not currently a dimension in a chart may be included in the list. This may be useful in the case of group dimensions, where the dimension fields are not fixed. Listing all of the variables in the group causes the function to work when the cycle or drill-down level changes.

Examples:

avg( Sales )

avg( X*Y/3 )

avg( distinct Price )

avg( total Sales )

avg( {1} total Sales )



Not applicable
Author

Hi,

Avg under the tredline is not calculated as the normal avg calculation. any have tahnks