Export (0) Print
Expand All

Aggregate

SQL Server 2000

Aggregate

Returns a calculated value using the appropriate aggregate function, based on the aggregation type of the member.

Syntax

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

Remarks

This function cannot be used on calculated members.

Example

In the following expression, the calculated member Total is displayed first against the measure SumSales and then against the measure MaxSales. In the former case, Total is calculated by adding (with Sum). In the latter case, Total is calculated by taking the maximum.

WITH MEMBER Geography.Total AS  'AGGREGATE({USA, France})'
SELECT {Measures.SumSales, Measures.MaxSales} ON COLUMNS,
      {USA, France, Total} ON ROWS
FROM SalesCube
WHERE ([1998])
Show:
© 2014 Microsoft