dbTalk Databases Forums  

Totals of axes

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


Discuss Totals of axes in the microsoft.public.sqlserver.olap forum.



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

Default Totals of axes - 08-18-2003 , 06:00 AM






Hi group!

Is there a way of querying for a total of the axes?

I want to show:

2002 2003 Total Time
Total Product 30 30 60
Product 1 10 10 20
Product 2 20 20 40

I cannot use {[Dimension].DefaultMember} because i will get the grand
totals, not row/column totals.






Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Totals of axes - 08-18-2003 , 10:03 PM






You can use the MDX VisualTotals() function.
Here is an example from Foodmart Sales cube:

Quote:
Select VisualTotals({[Time].[1997], [Time].[1997].[Q2],
[Time].[1997].[Q3]}, "Total - *") on Columns,
VisualTotals({[Product].[All Products].[Food],[Breakfast
Foods], [Canned Foods], [Frozen Foods]}, "Total - *") on Rows
From Sales
Where ([Measures].[Store Sales])
Quote:
- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.