dbTalk Databases Forums  

attribute relationships with parent child dimension

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


Discuss attribute relationships with parent child dimension in the microsoft.public.sqlserver.olap forum.



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

Default attribute relationships with parent child dimension - 09-20-2006 , 04:36 AM






I'm trying to replace my calls to .properties() within calculated cells to
using the relevant hierarchy but I can't seem to get them to work properly
with parent child dimensions.
Given a flat dimension 'Time' with attributes 'A' and 'B', if I drop
[Time].[Time] onto the SSAS pivot table then from within a calculated cell I
can access [Time].[A].currentmember and [Time].[b].currentmember, as expected.
If I take an 'Employee' parent child dimension with attributes 'A', 'B' and
'Parent ID' and drop [Employee].[Employee] or [Employee].[Parent ID] onto a
pivot table then my calculated cell only seems to have access to
[Employee].[A].[All] and [Employee].[b].[All]. To get the 'A' or 'B' data I
have to do this - [Employee].[Employee].currentmember.properties ("A") or
[Employee].[Parent ID].currentmember.properties ("A"), depending which
hierarchy has been dropped onto the pivot table.
I let SSAS build the dimensions for me - do I need to make some changes to
get this to work with parent child dimensions?

Paul.

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

Default Re: attribute relationships with parent child dimension - 09-20-2006 , 12:50 PM






For the attributes "A" and "B" in your Parent-Child dimension, is the
"AttributeHeirarchyEnabled" property set to true? For example, if you
look at the "Currency Code" attribute of the "Organization" dimension in
Adventure Works (where it is set to true), does this issue occur?


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #3  
Old   
Paul R
 
Posts: n/a

Default Re: attribute relationships with parent child dimension - 09-20-2006 , 02:55 PM



"Deepak Puri" wrote:

Quote:
For the attributes "A" and "B" in your Parent-Child dimension, is the
"AttributeHeirarchyEnabled" property set to true? For example, if you
look at the "Currency Code" attribute of the "Organization" dimension in
Adventure Works (where it is set to true), does this issue occur?
Yes, I've got the hierarchies enabled. The same thing happens in Adventure
Works as well. If you look at the 'Financial Reporting' measure of Adventure
Works you'll see it has two dimensions associated with it - Organization and
Date. Organization is parent child, Date is flat.
If you create a calculated cell like this-
Scope ([Measures].[Amount]);

this = [Date].[Day Name].currentmember.uniquename;

end scope;
and drop [Measures].[Amount] from the Financial Reporting measure and
[Date].[Date] or [Date].[Day Name] on an axis then each cell will display the
name of the date element passed to that cell.
However, you can't do the same thing with Organization i.e.
Scope ([Measures].[Amount]);

this = [Organization].[Currency Code].currentmember.uniquename;

end scope;
and then drop [Organization].[Organizations] onto the pivot table because
there's no relationship between the Organizations hierarchy and Currency
Code. In this instance, how can you reference the Currency Code attribute
from the Organizations hierarchy without doing something like this -
[Organization].[Organizations].currentmember.properties ("Currency Code")?

Paul.


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.