Let's start with a basic and pure OBIEE report. We want to see the average coverage % by the 3rd generation of our product hierarchy:
![](http://lh5.ggpht.com/_kh3-h2s8BmA/SexTlXsbWFI/AAAAAAAAAR0/ijRufy-IbvM/s288/001_obiee_criteria.jpg)
![](http://lh3.ggpht.com/_kh3-h2s8BmA/SexTlGRWfuI/AAAAAAAAARs/rzPWKBzPVXE/s144/002_obiee_results.jpg)
Now let's switch out the presentation column for an EVALUATE function with MDX as what we really want is the average coverage % for the scenario "Actual":
![](http://lh3.ggpht.com/_kh3-h2s8BmA/SexTlZbRk0I/AAAAAAAAAR8/5_AJhGkD-pA/s144/003_MDX_column_formula.jpg)
EVALUATE('(%1.dimension.currentmember, [Scenario].[Actual],[Account].[Coverage % Avg]).value' as INTEGER, Product."Gen3,Product")
Let's run it.
![](http://lh6.ggpht.com/_kh3-h2s8BmA/SexTlId9g1I/AAAAAAAAARo/yOdRYYZ61aM/s144/004_MDX_display_error.jpg)
"Unknown Member Coverage % Avg"? Liar. I see it directly in front of me. Off to checking the log:
With
set [Product3] as 'Generate([Product].Generations(2).members, Descendants([Product].currentmember, [Product].Generations(3), leaves))'
member [Account].[MS1] as '([Product].Generations(3).dimension.currentmember,[Scenario].[Actual],[Account].[Coverage % Avg])).value'
member [Account].[MS2] as 'RANK([Product].Generations(3).dimension.currentmember,[Product].Generations(3).members)'
select
{MS1,
MS2} on columns,
{{[Product3]}} properties ANCESTOR_NAMES, GEN_NUMBER on rows
from [MyCube.Ess931_ASO]
-------------------- Query Status: Query Failed: Essbase Error: UnknownMember Coverage % Avg used in query
Do you see the difference? While on the guy, it states "Coverage % Avg", the log and the MDX which is actually fired, reference "Coverage % Avg". TWO spaces!
So let's work around this by changing the EVALUATE to include the "StrToMbr" function:
![](http://lh3.ggpht.com/_kh3-h2s8BmA/SexTlGuW3fI/AAAAAAAAARw/f28otmB-MAE/s144/005_corrected_MDX.jpg)
EVALUATE('(%1.dimension.currentmember, [Scenario].[Actual],StrToMbr("[Account].[Coverage % Avg]")).value' as INTEGER, Product."Gen3,Product")
When running this, we get the correct results again:
![](http://lh6.ggpht.com/_kh3-h2s8BmA/SexTleicT3I/AAAAAAAAAR4/EvbWLmQ13WI/s144/006_MDX%20results.jpg)
So if you want to reference members containing special characters, use StrToMbr since otherwise you will get a non-functioning MDX from the BI server.
End of line