dbTalk Databases Forums  

"Rollup" dimensions or calculated members

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


Discuss "Rollup" dimensions or calculated members in the microsoft.public.sqlserver.olap forum.



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

Default "Rollup" dimensions or calculated members - 04-28-2005 , 12:46 PM






Is it possible to create a single member that aggregates tuples across
dimensions? To illustrate, imagine a cube:

Dimension.Member Qty
-----------------------
A.1 100
A.2 200
B.10 300
B.11 400

I want to be able to define a member or entitity "x" that aggregates
measures for {A.1, A.2, B.10}, such that

select {[Measures].[Qty]} on 0, {[<some dim>].[x]} on 1 from MyCube

results in

Dimension.Member Qty
-----------------------
<some dim>.x 600

Creating a named set almost gets there, but in the result the rows axis
displays the individual members of the set, not an aggregate. A calculated
member seems to be the answer, but it appears a calculated member can't refer
to members outside of its dimension/level - hence I stubbed in <some dim>
above.

Any suggestions appreciated. Thanks.



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

Default Re: "Rollup" dimensions or calculated members - 04-28-2005 , 06:16 PM






Here's an example for the Foodmart Sales cube, which sums [Unit Sales]
across [Product].Drink], [Product].[Food] and [Promotions].[Big Promo]:

Quote:
With Member [Product].[All Products].[X] as
'Aggregate({
([Product].[All Products].[Drink],
[Promotions].[All Promotions]),
([Product].[All Products].[Food],
[Promotions].[All Promotions]),
([Product].[All Products],
[Promotions].[All Promotions].[Big Promo])})'
select {[Measures].[Unit Sales]} on columns,
[Product].[Product Family].AllMembers on rows
from Sales
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
Scott Saverance
 
Posts: n/a

Default Re: "Rollup" dimensions or calculated members - 04-29-2005 , 09:50 AM



I see. That works. Thanks a bunch.

- Scott

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.