dbTalk Databases Forums  

iif question on calculated dimension

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


Discuss iif question on calculated dimension in the microsoft.public.sqlserver.olap forum.



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

Default iif question on calculated dimension - 05-02-2005 , 12:25 PM






2 dimensions (status_start, status_end), 1 calculated dimension(Better) on
(status_end):

i want to have the Better calculated dimension works like:
iif([Roll_Status_Start].currentmember = [Roll_Status_start].[all
status].good] or [Roll_Status_Start].currentmember =
[Roll_Status_start].[all status].[Fair],
sum({[Roll_Status_End].[all status].[PIF}),0)

This doesn’t work at all…anybody can give me some advice?? Thanks.




Reply With Quote
  #2  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: iif question on calculated dimension - 05-02-2005 , 10:56 PM






First - conditions needs to be rewritten - please refer to
http://sqljunkies.com/WebLog/mosha/a...1/04/4959.aspx for details
Second - the SUM doesn't make much sense, because it sums over single
member. And since it doesn't change current coordinate on the dimension
where Better is defined - it will result in infinite recursion.

--
==============================*=================== =
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebL*og/mosha
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==============================*=================== =
"urgent" <urgent (AT) discussions (DOT) microsoft.com> wrote

Quote:
2 dimensions (status_start, status_end), 1 calculated dimension(Better) on
(status_end):

i want to have the Better calculated dimension works like:
iif([Roll_Status_Start].currentmember = [Roll_Status_start].[all
status].good] or [Roll_Status_Start].currentmember =
[Roll_Status_start].[all status].[Fair],
sum({[Roll_Status_End].[all status].[PIF}),0)

This doesn't work at all.anybody can give me some advice?? Thanks.






Reply With Quote
  #3  
Old   
Nin
 
Posts: n/a

Default RE: iif question on calculated dimension - 05-03-2005 , 05:11 AM



If possible try this code and let me know. The given code will work for
FoodMart 2000 "sales" Cube

IIf([Customers].CurrentMember.Name="CA" or
[Customers].CurrentMember.Name="OR" ,[Measures].[Unit Sales],0)

Ninad M. Dixit

"urgent" wrote:

Quote:
2 dimensions (status_start, status_end), 1 calculated dimension(Better) on
(status_end):

i want to have the Better calculated dimension works like:
iif([Roll_Status_Start].currentmember = [Roll_Status_start].[all
status].good] or [Roll_Status_Start].currentmember =
[Roll_Status_start].[all status].[Fair],
sum({[Roll_Status_End].[all status].[PIF}),0)

This doesn’t work at all…anybody can give me some advice?? 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.