Home      Functions     Common Solutions      Contact     

MDX Functions:
MDX Functions

Common Solutions

Common Solutions
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
Other Links

Contact Us
Microsoft SQL Server Analysis Services Function Page
Function Name: Sum
Category: Statistical
Description: The Sum function returns the summed value of a numeric expression across a supplied set.
Syntax: SUM( «Set»[, «Numeric Expression»] )
Technet Link: MDX Sum Function

The following query returns the sum of the Customer Count measure across all children of Washington.
      MEMBER [Measures].[WashCustCountSum] AS
      SUM([Customer].[Customer Geography].[State-Province].[Washington].Children, [Measures].[Customer Count])
      {[Measures].[WashCustCountSum]} ON COLUMNS
      [Adventure Works]

The following query returns the sum of the Sales Amount measure for the Gloves and Jerseys product members for the month of July 2003.
      MEMBER [Measures].[SalesAmountSum] AS
      SUM({[Product].[Product Model Categories].[Subcategory].[Gloves], [Product].[Product Model Categories].[Subcategory].[Jerseys]}, ([Date].[Fiscal].[July 2003], [Measures].[Sales Amount]))
      {[Measures].[SalesAmountSum]} ON COLUMNS
      [Adventure Works]


Copyright 2008 by MDXpert.com.
Terms of Use                              Privacy Statement
Site Powered By - WinHost.Com