dbTalk Databases Forums  

Strange result in iif-statement

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


Discuss Strange result in iif-statement in the microsoft.public.sqlserver.olap forum.



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

Default Strange result in iif-statement - 07-08-2003 , 03:09 AM






Hello all,

I have a strange situation...

I have the following MDX-syntax:

IIF(([View].[Period Values] <> NULL),
IIF(LEFT([Measures].CurrentMember.Name,6) = "Budget"
-- value #1 --
,1
-- value #2 --
,0
)
,NULL)

In the result, when Measures = Budget, the result = 2 (2 times value
#1), and when Measures <> Budget, the result = 0 (good).

When I leave the first iff-statement away:

IIF(LEFT([Measures].CurrentMember.Name,6) = "Budget"
-- value #1 --
,1
-- value #2 --
,0
)

In the result, when Measures = Budget, the result = 4 (4 times value
#1).

What do I do wrong? I just want 1 (value #1) as result.

Thanks for any help.

Marco.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.