dbTalk Databases Forums  

Summing Ratios

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


Discuss Summing Ratios in the microsoft.public.sqlserver.olap forum.



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

Default Summing Ratios - 08-26-2005 , 08:47 AM






I have a cube with two measures [Measures].[M1] and [Measures].[M2].

I have created a calculated member [Measures].[M3]:
[Measures].[M1] / [Measures].[M2]

The data is at the daily level (and there are plenty other dimensions in the
cube).
The time dimension has also Month, Quarter and Year levels.

I would like the behaiour of the calculated member, [Measures].[M3], to be
that it yields a sum of the ratios across all dimensions and levels for
the given selections. Unfortunately it takes a ratio of the sums.

How can this behaviour be changed?

Regards,
MT



Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Summing Ratios - 08-26-2005 , 10:18 AM






You can create a regular measure and define the ratio in the source column
expression. Alternatively you can create a view of the fact table and define
the ratio as a calculated column, and then base your measure on that column.
These approaches will improve query response times but processing time will
be longer.
HTH,
--
Brian Altmann
BI Specialist
Huddle Group S.A (www.huddle.com.ar)
www.geocities.com/brianaltmann/olap.html


"MT" wrote:

Quote:
I have a cube with two measures [Measures].[M1] and [Measures].[M2].

I have created a calculated member [Measures].[M3]:
[Measures].[M1] / [Measures].[M2]

The data is at the daily level (and there are plenty other dimensions in the
cube).
The time dimension has also Month, Quarter and Year levels.

I would like the behaiour of the calculated member, [Measures].[M3], to be
that it yields a sum of the ratios across all dimensions and levels for
the given selections. Unfortunately it takes a ratio of the sums.

How can this behaviour be changed?

Regards,
MT



Reply With Quote
  #3  
Old   
Jéjé
 
Posts: n/a

Default Re: Summing Ratios - 08-26-2005 , 12:44 PM



does the M1 & M2 measures are sum measures? or there is a sum & a count?

what is the expected result at the month level?
Day 1: 50 / 10 = 5
Day 2: 100 / 10 = 10
Day 3: 50 / 10 = 5
Day 4: 100 / 10 = 10
....
month= ? (by default the result is: 300 / 40 = 7.5)

have you try to add a new measure: M4 which is the a simple count and M3=
(M1 / M2) / M4



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

Quote:
I have a cube with two measures [Measures].[M1] and [Measures].[M2].

I have created a calculated member [Measures].[M3]:
[Measures].[M1] / [Measures].[M2]

The data is at the daily level (and there are plenty other dimensions in
the
cube).
The time dimension has also Month, Quarter and Year levels.

I would like the behaiour of the calculated member, [Measures].[M3], to
be
that it yields a sum of the ratios across all dimensions and levels for
the given selections. Unfortunately it takes a ratio of the sums.

How can this behaviour be changed?

Regards,
MT





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.