dbTalk Databases Forums  

Please help to create Calculated members

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


Discuss Please help to create Calculated members in the microsoft.public.sqlserver.olap forum.



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

Default Please help to create Calculated members - 09-13-2006 , 11:55 AM






Year----2005----1stHalf
----2nd Half
----I need to create a calculated member under
2005 which is Avg of 1st & 2nd Half

Year ---2006--- Same thing

I have a Time dimension and we have 2001-2006 years and the way we
calucaluted FY scores is 1st and 2nd Half average

Thanks in advance
Sam


Reply With Quote
  #2  
Old   
ZULFIQAR SYED
 
Posts: n/a

Default Re: Please help to create Calculated members - 09-13-2006 , 11:53 PM






Hi Sam,

Try using Avg function on currentmember.parent.children as follows. I
tested this sample code against ss2k5 adventure works olap database.

with member measures.x as
avg(

[Date].[Calendar].currentmember.parent.children,

[Measures].[Reseller Sales Amount]
)
select
{
[Measures].[Reseller Sales Amount]
,measures.x
}
on 1,
{
[Date].[Calendar].[Calendar Semester].&[2002]&[1]
,[Date].[Calendar].[Calendar Semester].&[2002]&[2]
,[Date].[Calendar].[Calendar Semester].&[2003]&[1]
,[Date].[Calendar].[Calendar Semester].&[2003]&[2]
} on 0
from
[Adventure Works]

HTH..

Thanks

ZULFIQAR SYED

HTTP://ZULFIQAR.TYPEPAD.COM

Sam wrote:
Quote:
Year----2005----1stHalf
----2nd Half
----I need to create a calculated member under
2005 which is Avg of 1st & 2nd Half

Year ---2006--- Same thing

I have a Time dimension and we have 2001-2006 years and the way we
calucaluted FY scores is 1st and 2nd Half average

Thanks in advance
Sam


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

Default Re: Please help to create Calculated members - 09-14-2006 , 10:44 AM



Thanks!!!

But I am using pivot table to access the cube. So I need to implement
the below logic in the calculated members for Time Dimension. So if
they pull TIME dimension they can see 3 children i.e.
2006
-- 1st Half
-- 2nd Half
-- FY (Calculated mebers Avg of 1st and 2nd Half)

so we have around 15 measures so i client pull all the 15 measures then
it should take the avg of all the 15 measures.

Thanks
Sam


ZULFIQAR SYED wrote:
Quote:
Hi Sam,

Try using Avg function on currentmember.parent.children as follows. I
tested this sample code against ss2k5 adventure works olap database.

with member measures.x as
avg(

[Date].[Calendar].currentmember.parent.children,

[Measures].[Reseller Sales Amount]
)
select
{
[Measures].[Reseller Sales Amount]
,measures.x
}
on 1,
{
[Date].[Calendar].[Calendar Semester].&[2002]&[1]
,[Date].[Calendar].[Calendar Semester].&[2002]&[2]
,[Date].[Calendar].[Calendar Semester].&[2003]&[1]
,[Date].[Calendar].[Calendar Semester].&[2003]&[2]
} on 0
from
[Adventure Works]

HTH..

Thanks

ZULFIQAR SYED

HTTP://ZULFIQAR.TYPEPAD.COM

Sam wrote:
Year----2005----1stHalf
----2nd Half
----I need to create a calculated member under
2005 which is Avg of 1st & 2nd Half

Year ---2006--- Same thing

I have a Time dimension and we have 2001-2006 years and the way we
calucaluted FY scores is 1st and 2nd Half average

Thanks in advance
Sam


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.