none
calculate measure using dates

    Question

  • I am facing difficulty to calculate date difference of two dates

    Dimension contains ID, Name, CreateDate, CloseDate

    I would like to calculate CreateDate - CloseDate but i am getting #error by creating calculate measure within the CUBE

    datediff("d",[Dim].[CreateDate].currentmember.membervalue,[Dim].[CloseDate].currentmember.membervalue)

    but same statement is working using MDX

    with Member [Measures].[Age] as

    datediff("d",[Dim].[CreateDate].currentmember.membervalue,[Dim].[CloseDate].currentmember.membervalue)

    select [Age] on 0,

    {[Dim].[Id].children*[Dim].[CloseDate].children*[Dim].[CreateDate].children} on 1

    from [cube]

    Any idea, where am i doing mistake OR what is the way to calculate within the cube?


    RaghuM

    Thursday, July 17, 2014 8:27 PM

All replies