How do i escape "%" character in a dynamic MDX. I want "%" to be treated as a literal and not a wild card in MDX. Here is a basic idea of what is happening : I have a windows form (using c#) where user can create a dynamic search expression for MDX query. E.g. Currency Contains US
where "Currency" is static, condition "Contains" is a dropdown selectable value and then a textbox for "US".
So user clicks "Search" and a dynamic MDX is formed with above condition and a cube hit occurs.
Now, i dont get correct result when query is like :
Calculation Contains 50%
Here, % is treated as wild card and anything containing "50" is shown. Please Help. I have tried quotes "", square brackets [], back slash \, double characters %%. but no luck.
UPDATE : Its actually the front end meaning for the user, at the back end i use Analysis Stored Procedures, "IsLike" for this. Query is something like this : { WITH MEMBER [Measures].[Search] AS IIF( [ASSP].[IsLike] ([Calculation].[Calculation].CurrentMember.Properties('MEMBER_CAPTION'),'%50%%')}
Thanks
Contains
is not an Analysis Services MDX function. Is this implemented as a stored procedure? Then you would have to ask the developer of that procedure how he wants the text to be escaped. – FrankPl