Link to home
Start Free TrialLog in
Avatar of Marcus Aurelius
Marcus AureliusFlag for United States of America

asked on

SSAS MDX CASE STATEMENT

Experts,

I need to create a case statement in MDX.

My dataset looks like this:

UserID, Flag1, Flag2
100,1,-
100,0,1
100,1,-
101,1,-
101,0,1
101,1,-

Basically the DASH is used in place of a ZERO.


This is NOT working and results in "(null)"

Member [Measures].[Status Complete2] as
                  CASE
                  WHEN left([Measures].[Completed Flag]/[Measures].[Assigned Flag],1) = 1 THEN 1
                  WHEN left([Measures].[Completed Flag]/[Measures].[Assigned Flag],1) = '-' THEN 0
                  END

Any assistance is appreciated!
ASKER CERTIFIED SOLUTION
Avatar of dbaSQL
dbaSQL
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marcus Aurelius

ASKER

For this column I'm getting:
(null)
(null)
(null)
(null)
(null)
(null)

I should be seeing this:


1
1
0
1
0
0
0
1
0
1
0
If you could provide the whole statement and possibly some sample data, that would be good.
I've requested that this question be deleted for the following reason:

NO response...and I can't provide any additional info....