locked
Is possible to get only Grand Total from olap cube? RRS feed

  • Question

  • Hello

    I want to get Grand Total from olap cube, how can i do this?

    Sunday, May 23, 2010 7:15 PM

Answers

  • Hi Lasha,

    Sure you can,this gives the grand total for the measure Sales Amount

    select [Measures].[Sales Amount] on 0
    from [Adventure Works]

    hth,

    Cees


    Please remember to mark the replies as answers or at least vote helpfull if they help and unmark them if they provide no help.
    • Proposed as answer by Craig BrydenMVP Sunday, May 23, 2010 10:10 PM
    • Marked as answer by Lasha89 Monday, May 24, 2010 4:12 PM
    • Unmarked as answer by Lasha89 Monday, May 24, 2010 4:13 PM
    • Marked as answer by Lasha89 Monday, May 24, 2010 4:13 PM
    Sunday, May 23, 2010 8:49 PM

All replies

  • Hi Lasha,

    Sure you can,this gives the grand total for the measure Sales Amount

    select [Measures].[Sales Amount] on 0
    from [Adventure Works]

    hth,

    Cees


    Please remember to mark the replies as answers or at least vote helpfull if they help and unmark them if they provide no help.
    • Proposed as answer by Craig BrydenMVP Sunday, May 23, 2010 10:10 PM
    • Marked as answer by Lasha89 Monday, May 24, 2010 4:12 PM
    • Unmarked as answer by Lasha89 Monday, May 24, 2010 4:13 PM
    • Marked as answer by Lasha89 Monday, May 24, 2010 4:13 PM
    Sunday, May 23, 2010 8:49 PM
  • Thanks Cees can i do this for three measures? like this:

    select [Measures].[Sales Amount],[Measures].[Sales Amount1],[Measures].[Sales Amount2] on 0
    from [Adventure Works]
    Monday, May 24, 2010 4:14 PM
  • Hi Lasha,

    You can, but you should add curly braces {} because you're enclosing a set of elements, Like this:

    select { [Measures].[Sales Amount],[Measures].[Sales Amount1],[Measures].[Sales Amount2] } on 0
    from [Adventure Works]

    good luck,

    Cees


    Please remember to mark the replies as answers or at least vote helpfull if they help and unmark them if they provide no help.
    • Proposed as answer by RameshSahu Thursday, June 17, 2010 5:06 AM
    Monday, May 24, 2010 6:17 PM