dbTalk Databases Forums  

how to express this calculated member

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


Discuss how to express this calculated member in the microsoft.public.sqlserver.olap forum.



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

Default how to express this calculated member - 04-12-2006 , 11:32 PM






Hi,

I have a Test Miles measure and a Test Side dimension, which can be Left,
Right, or Both. There are several other dimension as well. I need to define
an Actual Test Miles calculated member which will do the right thing with
the Test Side dimension - multiply by 2 when member value is Both. What is a
good way to express this?

--------------------
Chris Harrington




Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: how to express this calculated member - 04-13-2006 , 05:29 AM






Chris,

Have you thought of using Unary operators, cell calculations or a custom
rollup formula on the dimension?

The following post on Mosha's blog should get you going:

http://sqljunkies.com/WebLog/mosha/a...3/27/9723.aspx

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <e14TTNrXGHA.4920 (AT) TK2MSFTNGP02 (DOT) phx.gbl>, "ChrisHarrington"
<charrington-at-activeinterface.com> says...
Quote:
Hi,

I have a Test Miles measure and a Test Side dimension, which can be Left,
Right, or Both. There are several other dimension as well. I need to define
an Actual Test Miles calculated member which will do the right thing with
the Test Side dimension - multiply by 2 when member value is Both. What is a
good way to express this?

--------------------
Chris Harrington





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

Default Re: how to express this calculated member - 04-13-2006 , 02:27 PM



Thanks Darren,
The first pass on this in on AS2000 and not enterprise edition. Do you
think that a custom rollup could accomplish this? How exactly would it be
expressed?

Much thanks,
Chris


"Darren Gosbell" <jam (AT) newsgroups (DOT) nospam> wrote

Quote:
Chris,

Have you thought of using Unary operators, cell calculations or a custom
rollup formula on the dimension?

The following post on Mosha's blog should get you going:

http://sqljunkies.com/WebLog/mosha/a...3/27/9723.aspx

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <e14TTNrXGHA.4920 (AT) TK2MSFTNGP02 (DOT) phx.gbl>, "ChrisHarrington"
charrington-at-activeinterface.com> says...
Hi,

I have a Test Miles measure and a Test Side dimension, which can be Left,
Right, or Both. There are several other dimension as well. I need to
define
an Actual Test Miles calculated member which will do the right thing with
the Test Side dimension - multiply by 2 when member value is Both. What
is a
good way to express this?

--------------------
Chris Harrington







Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: how to express this calculated member - 04-13-2006 , 10:23 PM



Actually I think in AS 2000, the easiest solution would be to set up a
customer member formula (I think the standard edition supports these)

Somthing like:

([Test Side].[Both]) * 2

This would multiple every measure for the "Both" side by 2.


If you just want to double one of the measures, you might need to create
two calculated measures. The first one (which would be set to
visible=false) would test if the side member is [Both], the second
measure would just sum up the first one below the currently selected
"Test Side" member.

eg.

[Actual Miles Pre]
==================
IIF([Test Side].CurrentMember is [Test Side].[Both], Measures.[Miles] *
2, [Measures].[Miles])

[Actual Miles]
==============
SUM( Descendants([Test Side].CurrentMember,,LEAVES), Measures.[Actual
Miles Pre])

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <uFI5GBzXGHA.3936 (AT) TK2MSFTNGP05 (DOT) phx.gbl>, "ChrisHarrington"
<charrington-at-activeinterface.com> says...
Quote:
Thanks Darren,
The first pass on this in on AS2000 and not enterprise edition. Do you
think that a custom rollup could accomplish this? How exactly would it be
expressed?

Much thanks,
Chris


"Darren Gosbell" <jam (AT) newsgroups (DOT) nospam> wrote in message
news:MPG.1ea8d2e8f03ed8fd9898f0 (AT) news (DOT) microsoft.com...
Chris,

Have you thought of using Unary operators, cell calculations or a custom
rollup formula on the dimension?

The following post on Mosha's blog should get you going:

http://sqljunkies.com/WebLog/mosha/a...3/27/9723.aspx

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <e14TTNrXGHA.4920 (AT) TK2MSFTNGP02 (DOT) phx.gbl>, "ChrisHarrington"
charrington-at-activeinterface.com> says...
Hi,

I have a Test Miles measure and a Test Side dimension, which can be Left,
Right, or Both. There are several other dimension as well. I need to
define
an Actual Test Miles calculated member which will do the right thing with
the Test Side dimension - multiply by 2 when member value is Both. What
is a
good way to express this?

--------------------
Chris Harrington








Reply With Quote
  #5  
Old   
ChrisHarrington
 
Posts: n/a

Default Re: how to express this calculated member - 04-17-2006 , 10:44 PM



Thanks Darren - that was the pattern (two calcs - one hidden) I was looking
for.

"Darren Gosbell" <jam (AT) newsgroups (DOT) nospam> wrote

Quote:
Actually I think in AS 2000, the easiest solution would be to set up a
customer member formula (I think the standard edition supports these)

Somthing like:

([Test Side].[Both]) * 2

This would multiple every measure for the "Both" side by 2.


If you just want to double one of the measures, you might need to create
two calculated measures. The first one (which would be set to
visible=false) would test if the side member is [Both], the second
measure would just sum up the first one below the currently selected
"Test Side" member.

eg.

[Actual Miles Pre]
==================
IIF([Test Side].CurrentMember is [Test Side].[Both], Measures.[Miles] *
2, [Measures].[Miles])

[Actual Miles]
==============
SUM( Descendants([Test Side].CurrentMember,,LEAVES), Measures.[Actual
Miles Pre])

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <uFI5GBzXGHA.3936 (AT) TK2MSFTNGP05 (DOT) phx.gbl>, "ChrisHarrington"
charrington-at-activeinterface.com> says...
Thanks Darren,
The first pass on this in on AS2000 and not enterprise edition. Do you
think that a custom rollup could accomplish this? How exactly would it be
expressed?

Much thanks,
Chris


"Darren Gosbell" <jam (AT) newsgroups (DOT) nospam> wrote in message
news:MPG.1ea8d2e8f03ed8fd9898f0 (AT) news (DOT) microsoft.com...
Chris,

Have you thought of using Unary operators, cell calculations or a
custom
rollup formula on the dimension?

The following post on Mosha's blog should get you going:

http://sqljunkies.com/WebLog/mosha/a...3/27/9723.aspx

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <e14TTNrXGHA.4920 (AT) TK2MSFTNGP02 (DOT) phx.gbl>, "ChrisHarrington"
charrington-at-activeinterface.com> says...
Hi,

I have a Test Miles measure and a Test Side dimension, which can be
Left,
Right, or Both. There are several other dimension as well. I need to
define
an Actual Test Miles calculated member which will do the right thing
with
the Test Side dimension - multiply by 2 when member value is Both.
What
is a
good way to express this?

--------------------
Chris Harrington










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.