none
How to add grand totals (last row) in my matrix? RRS feed

  • Question

  • I have a matrix in my report that shows client hours by year.  I need to add a grand total (last row) at the bottom.  In Layout, the first row of my matrix has the column header labels.  Row 2 has the detail values.  looks like this:

    |----------------------------------------------------------|
    | Client Name           |  Year          |   Hours          |
    |---------------------------------------------------------|
    | ClientName.Value   | Year.Value  |  Hours.Value  |
    -----------------------------------------------------------


    I have a matrix_ColumnGroup on Year.  This is what my report shows now:

    Client Name            2008    2009   Total
    ABC Company          10         15        25
    XYZ Company           5           10        15
                      TOTAL    15         25         40

    I'm using a Subtotal to get the row Total, but I can't get the grand total to show at the bottom of each column, i.e., under 2008, under 2009, and Total columns.

    What's the trick to do this in the Layout?

    Thanks,
    Chris



     
    Chris Palkovits
    Wednesday, February 17, 2010 3:12 PM

Answers

  • Hi Chris,

    To add grand total, you need to right click on the row header and select sub total to add a sub total at the bottom of the matrix.

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Friday, February 19, 2010 1:31 AM
    Moderator

All replies

  • Hi Chris,

    To add grand total, you need to right click on the row header and select sub total to add a sub total at the bottom of the matrix.

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Friday, February 19, 2010 1:31 AM
    Moderator
  • Hi Chris,

    Is this issue resolved? Thanks.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Monday, March 1, 2010 4:41 AM
    Moderator
  • My current matrix design has one subtotal that displays the hours across the years:

    For example, it shows:

                               2008                2009           Total
    ABC Company       10                   20               30
    XYZ  Company       5                     10               15

    In the layout, there is one subtotal that shows like this:

    -------------------------------------------------------
    |                        | "Hours Worked"| [gray box] |
    ------------------------------------------------------
    |"CLIENT NAME"   |   Year.Value    |    "Total"     |
    |--------------------|---------------------------------
    |  ClientNM.Value |   Sum (Hours)  |  [gray box] |
    --------------------------------------------------------


    If I right-click on the Year.Value field and pick Subtotal, the subtotal I currently have (which shows to the right of that) goes away.  It's as if I'm toggling the subtotal on and off.  If I right-click any of the other fields, I don't see a Subtotal option.

    Should I be trying this differently?

    Thank you,
    Chris
      



      

    =iif(IsNothing(Sum(Fields!HOURS.Value)),0,Sum(Fields!HOURS.Value))

     

        

     


    Chris Palkovits
    Thursday, March 4, 2010 7:10 PM