dbTalk Databases Forums  

Excluding Values within a given Dimension - Urgent - Please help

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


Discuss Excluding Values within a given Dimension - Urgent - Please help in the microsoft.public.sqlserver.olap forum.



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

Default Excluding Values within a given Dimension - Urgent - Please help - 10-21-2003 , 03:59 PM







I am new to MDX. Could anyone please help me ?



I have defined a dimension LOB which has 3 summary levels - Level1,

Level2, Level3.



I have a fact table with measures and this dimension key joined to the
fact table.



I am trying to total up the measure "Loss" after excluding a set

of values within the LOB dimension. These values can be from any level

of the Lob dimension



The dimension LOB looks like this:



Level1 Level2 Level3

------ ----- ------

BM BM BM

Bonds Bonds Fidelity

Bonds Bonds Surety

CAuto CAuto BI CAuto BI X UMBI

CAuto CAuto BI CAuto UMBI

CAuto CAuto PD CAuto PD

CAuto CAuto PIP CAuto PIP

CAPD CAPD CAPD



If the totals for all LOBs is say X

If the total for CAuto BI alone is Y

If the total for CAPD alone is Z

Then the total for All Excluding CAuto BI and CAPD should return

X-(Y+Z)



I would like to exclude multiple values for this dimension and get the

correct totals.



I used the following mdx, but it returns wrong results :



with member [LOB].[Excl] as 'Sum(Except([LOB].[All

LOB].Children),{Descendants([LOB].[All LOB].[CAuto Liab].[CAuto

BI],1,Self_Before_After),Descendants([LOB].[All
LOB].[CAPD],1,SELF_BEFORE_AFTER)}))'

select {[LOB].[Excl]} on rows,

{[Measures].[Loss]} on columns

from RCube





Thank you


--
Posted via http://dbforums.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.