dbTalk Databases Forums  

Measure only for certain Dimension Attributes

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


Discuss Measure only for certain Dimension Attributes in the microsoft.public.sqlserver.olap forum.



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

Default Measure only for certain Dimension Attributes - 11-06-2006 , 09:02 AM






Hi,

I've created a Dimension - Organisation (company_name,
department_name,room_name). The primary key is Organisation_ID and I
have a Measure Room Utilization. I'd like to show this Measure only
when Room_Name is selected and with every other member of this
Dimension there should occur a 0 for Room Utilization.

It works when I create a hierachy inside the Dimension with the
following MDX statement:


CREATE MEMBER CURRENTCUBE.[MEASURES].Room_Utilization
AS
case when [Organisation].CurrentMember.Level.Ordinal = 4
then [Measures].Room_Utilization
else 0
end
VISIBLE = 1;

how can I get it going when my Organisation Dimension has the following
attributes:
company_name,
department_name,
room_name

without hierachy and I only want to calculate the Measure Room
Utilization for the room_name attribute?

Thanks!


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

Default Re: Measure only for certain Dimension Attributes - 11-06-2006 , 11:44 AM






It's not clear whether [Measures].[Room_Utilization] is an intrinsic
cube or a calculated measure. Anyhow, if the condition is that the
original value should show when a specific member of the room_name
attribute is selected, regardless of other attribute selections, maybe
this calculation in the MDX script will suffice?

Scope([Measures].[Room_Utilization],
[Organisation].[room_name].[All]);
this = 0;
End Scope;



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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

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.