calculate the sum of measures - for a range ofperiod.

  • hi,

    How to calculate the sum of measures.Qty for a range of period.

    for example i want to sum up all the quantities between two weeks.

    (say from weekid - 0825 to weekid - 0840)

    Thanks,

    Regards

    Viji

  • Should look something like this:

    sum([Dimension].[Hierarchy].[0825]:[Dimension].[Hierarchy].[0840],[Measures].[Qty])

  • hi,

    i tried something like this

    select sum([Client Tbl Dim Calendar].[Day Week Id].&[0828]:[Client Tbl Dim Calendar].[Day Week Id].&[0824],[Measures].[Quantity Sold])

    from [DSVClientAdmin]

    i'm getting error :

    Executing the query ...

    Parser: The statement dialect could not be resolved due to ambiguity.

    Execution complete

    can you please help me in this?

    Thanks,

    Regards,

    Viji

  • I see that error when I have a dimension member that is present in two hierarchies. Try to fully qualify the member by putting in the [Dimension].[Hierarchy].[Member] ;

  • You need to put the measure on columns

    select sum([Client Tbl Dim Calendar].[Day Week Id].&[0828]:[Client Tbl Dim Calendar].[Day Week Id].&[0824],[Measures].[Quantity Sold]) ON COLUMNS

    from [DSVClientAdmin]

Viewing 5 posts - 1 through 4 (of 4 total)

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