dbTalk Databases Forums  

MDX: Members disappear when Key property added to dim

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


Discuss MDX: Members disappear when Key property added to dim in the microsoft.public.sqlserver.olap forum.



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

Default MDX: Members disappear when Key property added to dim - 07-21-2004 , 06:48 PM






I have to pull members for a dimension as well the key property for
one of its levels. The AS Help claims I can pull both for the same
dimension:

___________________________
Additional member properties can be selected by using the DIMENSION
PROPERTIES keyword after the set expression of the axis specification.
For example, the following MDX query:

SELECT
CROSSJOIN(Years, (Sales, BudgetedSales)) ON COLUMNS,
NON EMPTY Products.MEMBERS
DIMENSION PROPERTIES Products.SKU, Products.SRP ON ROWS
FROM SalesCube
WHERE (January, SalesRep.[All], Geography.USA)
____________________________

However when I add the "DIMENSION PROPERTIES " bit to my MDX, the
members specified just before it are no longer returned. This MDX
returns all members of the dimension:

SELECT {Measures.B} ON COLUMNS, NON EMPTY [PS_OF_RK_TK].Members ON
ROWS FROM HoursReport

But if I add the DIMENSION PROPERTIES bit:

SELECT {Measures.B} ON COLUMNS, NON EMPTY [PS_OF_RK_TK].Members
DIMENSION PROPERTIES [PS_OF_RK_TK].[Rank Code].[Key] ON ROWS FROM
HoursReport

I get the key, but all my members are gone. Is this a bug?

Thanks for any help,

Burt

Reply With Quote
  #2  
Old   
Olivier Matrat
 
Posts: n/a

Default Re: Members disappear when Key property added to dim - 07-22-2004 , 04:33 AM






Hi Burt

Sounds weird...this is not a bug I am aware of in any case, because if you
try the following, similar syntax on the Foodmart 2000 db using MDX sample
you get exactly what's expected:

select {[Measures].[Unit Sales]} on columns , non empty {[Product].[Product
Family].Members} dimension properties [Product].[Product Family].[Key] on
rows from sales

e.g; you will get the product families on rows, the measure on columns and,
bwhen double-clicking a row header, the value for product family keys (in
that case, they are the same as the captions however).

Maybe the problem comes from your NON EMPTYclause? What is Measure.[b]? A
calculated member? What exactly do you mean when you say all members are
gone? Do you get the right number of rows but with no row headers, only
columns?

HTH

Olivier.


"Burt" <burt_5920 (AT) yahoo (DOT) com> wrote

Quote:
I have to pull members for a dimension as well the key property for
one of its levels. The AS Help claims I can pull both for the same
dimension:

___________________________
Additional member properties can be selected by using the DIMENSION
PROPERTIES keyword after the set expression of the axis specification.
For example, the following MDX query:

SELECT
CROSSJOIN(Years, (Sales, BudgetedSales)) ON COLUMNS,
NON EMPTY Products.MEMBERS
DIMENSION PROPERTIES Products.SKU, Products.SRP ON ROWS
FROM SalesCube
WHERE (January, SalesRep.[All], Geography.USA)
____________________________

However when I add the "DIMENSION PROPERTIES " bit to my MDX, the
members specified just before it are no longer returned. This MDX
returns all members of the dimension:

SELECT {Measures.B} ON COLUMNS, NON EMPTY [PS_OF_RK_TK].Members ON
ROWS FROM HoursReport

But if I add the DIMENSION PROPERTIES bit:

SELECT {Measures.B} ON COLUMNS, NON EMPTY [PS_OF_RK_TK].Members
DIMENSION PROPERTIES [PS_OF_RK_TK].[Rank Code].[Key] ON ROWS FROM
HoursReport

I get the key, but all my members are gone. Is this a bug?

Thanks for any help,

Burt



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.