dbTalk Databases Forums  

Cube Design Problem: Different Granularities in the Same Cube

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


Discuss Cube Design Problem: Different Granularities in the Same Cube in the microsoft.public.sqlserver.olap forum.



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

Default Cube Design Problem: Different Granularities in the Same Cube - 02-20-2004 , 04:01 PM






I have a single cube in which I need to show measures at two different levels of granularity and still aggregate correctly

here are the details
the granularity is
Date/Flight/Clas

I have a fact table that has a "Class" granularit
the measure is
TotalBooking

so a simplified fact row would look like this
Class Total bookings mileage Capacit
1 5 1000 10
2 10 1000 10


However, the measures mileage and capacity are only valid at the flight leve
the cube needs to contain calculated measures tha
use mileage and capacity and agregate corectl

Flight TotalBookings Mileage Capacity TotalBooking/Capacity(calculated measure
1 15 1000 100 .1

I was thinking of creating a cube for each level of granularity and use a virtual cube to try and pull data from each cube
Is this a valid approach or can I solve this problem by using MDX

Thanks

Reply With Quote
  #2  
Old   
Sean Boon [MS]
 
Posts: n/a

Default Re: Cube Design Problem: Different Granularities in the Same Cube - 02-23-2004 , 01:38 PM






Your virtual cube route is the way to go. Basically, build your shared
dimension as if it were to go to the lowest level. Then, in a cube that has
data at a different level of granularity, you will disable the level(s)
below the level of granularity for that cube. You can then build a virtual
cube off these two cubes, and use calculated members to pull data from the
correct cube using MDX fucntions like
(IIF(<<YourDimension>>.currentmember.level.ordinal =<<Your specific level>>,
[Measures].[From Cube A], [Measures].[From Cube B])


--
Sean

--
Sean Boon
SQL Server BI Product Unit

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

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

Quote:
I have a single cube in which I need to show measures at two different
levels of granularity and still aggregate correctly.


here are the details:
the granularity is:
Date/Flight/Class

I have a fact table that has a "Class" granularity
the measure is:
TotalBookings

so a simplified fact row would look like this:
Class Total bookings mileage Capacity
1 5 1000 100
2 10 1000 100


However, the measures mileage and capacity are only valid at the flight
level
the cube needs to contain calculated measures that
use mileage and capacity and agregate corectly

Flight TotalBookings Mileage Capacity TotalBooking/Capacity(calculated
measure)
1 15 1000 100 .15

I was thinking of creating a cube for each level of granularity and use a
virtual cube to try and pull data from each cube.
Is this a valid approach or can I solve this problem by using MDX?

Thanks



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.