dbTalk Databases Forums  

Help in MDX Statement

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


Discuss Help in MDX Statement in the microsoft.public.sqlserver.olap forum.



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

Default Help in MDX Statement - 12-15-2003 , 07:46 AM






Here's the problem Description
I have 2 columns in my dimension: Losses Paid and Cat loss Paid. Cat Loss Paid is actually a calculated member and its calculation is based on Loss Paid
Now I want to calculate the value of Cat Loss Paid for the previous Month that is in Dec its hould show Nov value , In Nov it should show Oct Value and so on But when I use the following formula I do not get any value that is Zero Valu
([Results].&[400003600], [Accounting Period].PrevMember)) and even ([Results].&[400003600.PrevMember)) doenot work

Please let me know what the correct formula should be

Thanks

Reply With Quote
  #2  
Old   
Sean Boon [MS]
 
Posts: n/a

Default Re: Help in MDX Statement - 12-15-2003 , 01:52 PM






Cat Loss and Losses paid should be on the measures dimension. If so, all
you need to do is the following.

([Accounting Period].PrevMember, [Measures].[Loss Paid])

This will impact all levels of the accouting period. If you need to have
different logic based on different levels of the accounting period
dimension, then you'll need to wrap it in an IIF statement that tests for
the level of the Accounting Period dimesnion.

For exmaple,

IIF([Accounting Period].currentmember.level.name = "Month", ([Accounting
Period].prevmember, [Measures].[Loss Paid]), <<Your false condition here>>)


--
Sean

--
Sean Boon
SQL Server BI Product Unit

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.


"png" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Here's the problem Description:
I have 2 columns in my dimension: Losses Paid and Cat loss Paid. Cat Loss
Paid is actually a calculated member and its calculation is based on Loss
Paid.
Quote:
Now I want to calculate the value of Cat Loss Paid for the previous Month
that is in Dec its hould show Nov value , In Nov it should show Oct Value
and so on But when I use the following formula I do not get any value that
is Zero Value
Quote:
([Results].&[400003600], [Accounting Period].PrevMember)) and even
([Results].&[400003600.PrevMember)) doenot work.

Please let me know what the correct formula should be


Thanks



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.