SSRS - Matrix - Get total

  • hi

    i am facing one problem in Matrix tool in SSRS (SQL Server Reporting Services), simple there is one numeric value (suppos sale qty) to be display in data column with multiple dates as columns and different sales person in row now at the end i need total of sale qty vertically (date wise) as well as horizontally (sale person wise).. by looking to this query its simple but when i tryed to work on this its not that much easy and still facing problem for the same.

    any clue always appreciate.

  • Hi,

    Try using Sub-Total

    Right click on Column/Row Group and select Sub-total

    this might help u .....

  • i tryed using sub-total but that is pulling out wrong summation. its show the first value in total, i can try this at your end.

    i am using VS2003.

  • the subtotal's calculation is based on the detail cell. change the detail cell to use sum(...) instead of first(...).

  • hi thanks for your quick reply.. but sorry to say still dint clear my query

    look, i have simple qty field which is placed in detail section (value) without first(...) or sum(...) simple qty fields to display original value, not at bottom i need Total of such qty but it shows first value only.

  • when using a matrix, all detail cells should use an aggregate function even if you know there's only one value. the matrix's subtotals will then be based on that aggregation method. for example, if you use avg(), the subtotal will be an average of all; if you use sum(), the subtotal will be a sum of all.

    to get the subtotals to display, right click on the row/column grouping and choose Subtotal.

  • First use sum(Field_Name) in all your Detail fields in Matrix and then Subtotal for Columns/Row Group....

Viewing 7 posts - 1 through 6 (of 6 total)

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