[Mondrian] MDX Expression like <Member> <Op> <String> failed

Julian Hyde jhyde at pentaho.com
Thu Jun 4 06:53:42 EDT 2009

OK, you should be able to cast a member to a string. It should evaluate the
member (which will yield a cell value, usually numeric, depending on the
current measure) and convert that to string.

Can you log a jira case with a testcase from foodmart, for example,

with member [Measures].[Foo] as left(cast([Measures].[Unit Sales] as
String), 3)

should do something sensible.


> -----Original Message-----
> From: Alexander Korsukov [mailto:akorsukov at gmail.com] 
> Sent: Wednesday, June 03, 2009 8:01 PM
> To: jhyde at pentaho.com; Mondrian developer mailing list
> Subject: Re: [Mondrian] MDX Expression like <Member> <Op> 
> <String> failed
> To solve my problem, I can use Cast() instead of code modification.
> Because with this modification Case still dont work.
> 		case Cast([Measures].[M:Revenue ABC] as String)
> 			when 'A' then '|0.00%|color="#CC0000"'
> 			when 'B' then '|0.00%|color="#0066CC"'
> 			when 'C' then '|0.00%|color="#009900"'
> 			else '"-"'
> 			end
> --
> Alexander Korsukov
> _____________________________________________________
> mailto:akorsukov at gmail.com                icq:8572488
> (2E0A2052)                        xmpp:shko at jabber.ru

More information about the Mondrian mailing list