dbTalk Databases Forums  

Setting a member property of a calculated member

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


Discuss Setting a member property of a calculated member in the microsoft.public.sqlserver.olap forum.



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

Default Setting a member property of a calculated member - 02-17-2005 , 01:52 PM






Hi,

My Product dimension has four levels, in each one it has a member
property called MEMBER_CAPTION. I'm using a calculated member in a
query and I'd like to set the MEMBER_CAPTION property for this calc
member. How could I do that?

A simple example of my query is:

WITH
MEMBER [Product].[Seg/Cap] AS
'Sum({[Product].&[-194], [Product].&[-184]})', SOLVE_ORDER = 25

SELECT
{DISTINCT({({[Product].&[14]}), ({[Product].&[65]}),
({[Product].[Seg/Cap]})
DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS,
{[Time].[Months].[200403]} on COLUMNS
FROM MY_CUBE

The way I'm selecting the Products on rows is because I want to define
a custom order. So, the example above works fine, but if I try to set
the MEMBER_CAPTION in the calc member, doing the following:

WITH
MEMBER [Product].[Seg/Cap] AS
'Sum({[Product].&[-194], [Product].&[-184]})', SOLVE_ORDER = 25,
MEMBER_CAPTION = 'Seg/Cap'

I get an "Invalid cell property specified" error. Then if I try to
force the level, once the property belongs to levels, doing the
following:

WITH
MEMBER [Product].[Level 01].[Seg/Cap] AS
'Sum({[Product].&[-194], [Product].&[-184]})', SOLVE_ORDER = 25,
MEMBER_CAPTION = 'Seg/Cap'

I get a "cannot find a parent dimension" error.

I would aprecite any help.

Regards,

Vinicius Bellino

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Setting a member property of a calculated member - 02-17-2005 , 03:58 PM






According to the syntax for Calculated Member declaration, only Cell
Properties, not Member Properties, can be specified in the formula:
<
http://msdn.microsoft.com/library/en...anced_33zn.asp
Quote:
...
The <formula_specification> value for calculated members is further
broken out in the following syntax definition:

<formula_specification> ::= MEMBER <member_name>
AS '<value_expression>'
[,SOLVE_ORDER = <unsigned integer>]
[,<cell_property>=<value_expression>...]
...


The possible Cell Properties are listed here:
<
http://msdn.microsoft.com/library/de.../en-us/olapdma
d/agmdxadvanced_11yr.asp
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.