Create offline cube files (.cub) with OlapCube. Download Now!

table of contents


Returns the average value of a numeric expression evaluated over a set.


Avg(«Set»[, «Numeric Expression»])


This function requires an implicit count of the number of cells, not including empty cells. In order to force the inclusion of empty cells, the application must use the CoalesceEmpty function. For more information about empty cells, see the OLE DB documentation.


The following function returns 2000 if respective Sales are 1000, 2000, and 3000:

Avg({USA, Canada, Mexico}, Sales)