I do not know a solution for AdomdCommand
s, but within MDX: You can use the IsError
method which actually is not an MDX, but a VBA method:
with member [Measures].[Error Measure] as 1/[Measures].[Non Existing]
member [Measures].[Error Indicator] as IIf(IsError([Measures].[Error Measure]), 'error', 'ok')
member [Measures].[Error or Orig] as IIf(IsError([Measures].[Error Measure]), 'error', [Measures].[Error Measure])
select { [Measures].[Error Measure], [Measures].[Error Indicator], [Measures].[Error or Orig] } on 0
from [MyCube]