I have a SSAS stored procedure with a signature
public Set DoSomthing(Set toBeProcessed, Set measuresToWorkWith)
The set measurseToWorkWith is passed as {[Measures].[Measure1], [Measures].[Measure2] ...} with the measures being real or query-scoped calculated members.
To get the value of the measure for each tuple in the set toBeProcessed, I create an I call Expression.Calculate(tuple) which returns a MDXValue.
My problem is that in order to make the code generic I need to get the real (.NET) data type of the MDXValue as it only has explicit conversion methods ToInt16() etc.
If the measure is real then I can look up its metadata. However, it appears that if it is a formula (scoped member) then all bets are off?
Any ideas?