dbTalk Databases Forums  

Adding "Grand Total" at the bottom...

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Adding "Grand Total" at the bottom... in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Toby
 
Posts: n/a

Default Adding "Grand Total" at the bottom... - 08-30-2006 , 12:59 PM






I fairly new to SQL Server 2005 SSAS. I'm using the sample that is provided
with 2005.

I have the following MDX statement:

WITH SET [Data] AS
'{[Measures].[Internet Order Count], [Measures].[Internet Total Product
Cost],
[Measures].[Internet Sales Amount], [Measures].[Internet Average Unit Price],
[Measures].[Internet Gross Profit Margin]}'

SELECT
[Data] ON COLUMNS,
[CUSTOMER Geography].[Country].AllMembers ON ROWS
FROM [Adventure Works]


It returns the data correctly, however, I want to add the grand totals for
each column, like it does when you use the browser in BIDS.

Any help is appreciated and thanks in advance

Reply With Quote
  #2  
Old   
ChrisHarrington
 
Posts: n/a

Default Re: Adding "Grand Total" at the bottom... - 08-30-2006 , 10:25 PM






Just add the All member:

WITH SET [Data] AS '{
[Measures].[Internet Order Count],
[Measures].[Internet Total Product Cost],
[Measures].[Internet Sales Amount],
[Measures].[Internet Average Unit Price],
[Measures].[Internet Gross Profit Margin]
}'

SELECT
[Data]
ON COLUMNS,
{
[Customer].[Customer Geography].[Country].AllMembers,
[Customer].[Customer Geography].[All Customers]
}
ON ROWS
FROM [Adventure Works]

"Toby" <Toby (AT) discussions (DOT) microsoft.com> wrote

Quote:
I fairly new to SQL Server 2005 SSAS. I'm using the sample that is
provided
with 2005.

I have the following MDX statement:

WITH SET [Data] AS
'{[Measures].[Internet Order Count], [Measures].[Internet Total Product
Cost],
[Measures].[Internet Sales Amount], [Measures].[Internet Average Unit
Price],
[Measures].[Internet Gross Profit Margin]}'

SELECT
[Data] ON COLUMNS,
[CUSTOMER Geography].[Country].AllMembers ON ROWS
FROM [Adventure Works]


It returns the data correctly, however, I want to add the grand totals for
each column, like it does when you use the browser in BIDS.

Any help is appreciated and thanks in advance



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.