SSAS Stored Procs - Identify real data type of MDXValue returned from Expression.Calculate()

  • 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?

  • The only thing I can think of is to have a look through the source code of the ASSP project and see if they have done anything similar that you can lift:

    https://asstoredprocedures.codeplex.com/SourceControl/latest

    Otherwise I guess it would be more of a .NET forum question.


    I'm on LinkedIn

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply