locked
CREATE MEMBER Evaluation RRS feed

  • Question

  • IIf I use a Create Member statement in the Calculation segemnt of the Cube at what point is it evaluated, Built time or on Query Execution

    As an Example I wnat to create a Current Year Member, so was thinking about using the following

    CREATE MEMBER CURRENTCUBE. [Year Of Account].[Year].[Current Year Of Account]

      AS StrToMember("[Year Of Account].[Year].["+Format(Now(),"yyyy")+"]");

    I understand that the StrToMember() function is inefficent, so I wuold like to avoid evalutaion at query time. 


    Jason
    Friday, March 25, 2011 8:59 AM

Answers

  • If I understand the original post I don't think you were asking about the evaluation order, but rather whether the calculations in the MDX Script were materialized at processing time.

    The short is no. Everything in the calculation script is evaluated at query time. Nothing is stored during processing.


    http://darren.gosbell.com - please mark correct answers
    • Proposed as answer by Jerry Nee Wednesday, March 30, 2011 11:17 AM
    • Marked as answer by Jerry Nee Saturday, April 2, 2011 7:27 AM
    Saturday, March 26, 2011 8:00 PM

All replies

  • Hi Jason

    I think you might want to look at this description: http://technet.microsoft.com/en-us/library/ms144787.aspx

    <snip>
    Scope Isolation
    When a cube Multidimensional Expressions (MDX) script contains calculated members, by default the calculated members are resolved before any session-scoped calculations are resolved and before any query-defined calculations are resolved.
    </snip>

    HTH


    MCITP BI & MCPD .Net - please mark correct answers
    Friday, March 25, 2011 9:49 AM
  • If I understand the original post I don't think you were asking about the evaluation order, but rather whether the calculations in the MDX Script were materialized at processing time.

    The short is no. Everything in the calculation script is evaluated at query time. Nothing is stored during processing.


    http://darren.gosbell.com - please mark correct answers
    • Proposed as answer by Jerry Nee Wednesday, March 30, 2011 11:17 AM
    • Marked as answer by Jerry Nee Saturday, April 2, 2011 7:27 AM
    Saturday, March 26, 2011 8:00 PM