title: MDX: IIf condition on the value of a dimension is always false
body: <p>I am trying to produce a different output in a column dependent on whether the value of a dimension <code>[Scenario].[Option]</code> is <code>+5</code> which I've tried to achieve using the <code>IIf</code> function.</p>
  
  <pre><code>WITH MEMBER [XorY] AS
  (
      IIf([Scenario].[Option] = +5, 'X', 'Y')
      --IIf([Scenario].[Option].&amp;[+5], 'X', 'Y')
  )
  SELECT
  NON EMPTY
  (
      [Scenario].[Option].[Option]
  ) ON ROWS,
  NON EMPTY
  (
      [XorY]
  ) ON COLUMNS
  FROM [RePro]
  WHERE
  (
      [ABC].[ABC].[Val]
  ) CELL PROPERTIES VALUE
  </code></pre>
  
  <p>However, using either of the <code>IIf</code> statements as above, <code>[XorY]</code> is always <code>Y</code> regardless of the value of <code>[Scenario].[Option]</code>. It seems the comparison I'm doing is just syntactically wrong or something. How do I do this? I've noticed it works much better if I use a calculated member in a <code>[Measures]</code> dimension in the <code>IIf</code> condition, but that is not possible in my case - I must use <code>[Scenario].[Option]</code>.</p>
  
  <p>Thanks for any help received :)</p>