I've got data type of every measure in my cube specified as Currency
.
I've also got calculated members, some of them have iif(isempty([Measures].[Measure1]) or [Measures].[Measure1] = 0, null, 100 * [Measures].[Measure2] / [Measures].[Measure1])
logic.
I'm accessing this cube using MdxClient (it uses AdomdCommand.ExecuteXmlReader
internally) and have noticed that some of this calculated members are returned as xsd:double
not xsd:decimal
. So I assume that they are calculated as Double
not Currency
. Query results are mapped to strongly typed data set at client side, so returned type is important to me.
I can 'force' ssas to return xsd:decimal
by wrapping each of calulated members with VBA!CDec
or just CDec
, but this seriously degrades perfomance.
Is there a smarter way to set or force calculated member to be Currency
? Or at least be returned as xsd:decimal
by AdomdCommand.ExecuteXmlReader
?
Have the code of calculated member this way: