dbTalk Databases Forums  

Calculated Members and similar patterns

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


Discuss Calculated Members and similar patterns in the microsoft.public.sqlserver.olap forum.



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

Default Calculated Members and similar patterns - 05-03-2004 , 02:20 PM






Hello,

I have 15 measures and would like to produce reports
which have weeks as the rows and
a) the current years measure
b) the previous year's measure
c) current year's measure less the previous year's measure
as columns.
Some reports would only have only 1 measure
whereas others would have 2 or 3 measures.

Would you define 15 new measures for the previous year's
measures and 15 new measures for the differences?
Is this the best approach?

Thanks
Gary

Thanks
Gary




Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default Re: Calculated Members and similar patterns - 05-04-2004 , 04:16 AM






Gary,

No, as I think you suspect, creating 15 calculated measures for each
real measure when you only want to compare current and previous year
values is not the most efficient way to approach the problem. What you
need is a 'time utility dimension', described in chapter 11 of 'MDX
Solutions' by George Spofford; if you don't have the book, search for
his postings on this ng where he discusses them, eg
http://groups.google.co.uk/groups?hl...com%26rnum%3D1

HTH,

Chris

"GBillins" <gbillins (AT) petvalu (DOT) com> wrote

Quote:
Hello,

I have 15 measures and would like to produce reports
which have weeks as the rows and
a) the current years measure
b) the previous year's measure
c) current year's measure less the previous year's measure
as columns.
Some reports would only have only 1 measure
whereas others would have 2 or 3 measures.

Would you define 15 new measures for the previous year's
measures and 15 new measures for the differences?
Is this the best approach?

Thanks
Gary

Thanks
Gary

Reply With Quote
  #3  
Old   
gbillins
 
Posts: n/a

Default Re: Calculated Members and similar patterns - 05-04-2004 , 07:02 AM




Can this method be used to include more than 1 measure per
report? I don't understand how I would get for example
get 2 measures M and N in the same report.

M Prior Yr M Diff M N Prior Yr N Diff N
- ---------- ------ - ---------- ------

Thanks
Gary

Quote:
-----Original Message-----
Gary,

No, as I think you suspect, creating 15 calculated
measures for each
real measure when you only want to compare current and
previous year
values is not the most efficient way to approach the
problem. What you
need is a 'time utility dimension', described in chapter
11 of 'MDX
Solutions' by George Spofford; if you don't have the
book, search for
his postings on this ng where he discusses them, eg
http://groups.google.co.uk/groups?hl=en&lr=&ie=UTF-
8&oe=UTF-8&threadm=3D66285F.F69BE1E5%
40dsslab.com&rnum=1&prev=/groups%3Fq%3DSpofford%2Btime%
2Butility%2Bdimension%
2Bgroup:microsoft.public.sqlserver.olap%26hl%3Den% 26lr%3D%
26ie%3DUTF-8%26oe%3DUTF-8%26group%
3Dmicrosoft.public.sqlserver.olap%26selm%
3D3D66285F.F69BE1E5%2540dsslab.com%26rnum%3D1
Quote:
HTH,

Chris

"GBillins" <gbillins (AT) petvalu (DOT) com> wrote

Hello,

I have 15 measures and would like to produce reports
which have weeks as the rows and
a) the current years measure
b) the previous year's measure
c) current year's measure less the previous year's
measure
as columns.
Some reports would only have only 1 measure
whereas others would have 2 or 3 measures.

Would you define 15 new measures for the previous
year's
measures and 15 new measures for the differences?
Is this the best approach?

Thanks
Gary

Thanks
Gary
.


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

Default Re: Calculated Members and similar patterns - 05-04-2004 , 07:16 AM



You can crossjoin a set of measures and a set of "time utility" members, say

select
{ {measures.m,measures.n} * {TU.Actual, TU.Prior, TU.Diff}} on column
from cub

HTH
Bria
www.geocities.com/brianaltmann/olap.html

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.