Search code examples
reporting-servicesgroupingaverage

Average in SSRS table with grouping


Having difficulty with SSRS and the tablix setup, but it has been tough to find an answer looking through SO.

I have a SQL table with records that each have an industry as well as data. I am hoping to group based on the industry and have the average come from that. Instead, as I have created it, so far it seems to be bringing in the average based on each record and then bringing each record into the group. This is what it looks like now:

INDUSTRY AVG
INDUSTRY 1 20
5
20
------------ --------------
INDUSTRY 2 12
15
66
------------ --------------

This is what I was hoping to get:

INDUSTRY AVG
INDUSTRY 1 15
------------ --------------
INDUSTRY 2 31
------------ --------------

Here is my setup: SSRS Setup

I am coming from a SQL background and grouping in that would combine these together, so I am sure it is something that I am doing but it has been tough to find the correct documentation for what I am looking for. Thanks for the help and sorry it is a basic question that has likely been answered before.


Solution

  • It looks like you either have.....

    1. A details rowgroup (which does not do any grouping)
    2. More than one row group

    Check your rowgroup(s) (under the main designer panel).

    Basically, to produce your example, you only need a single rowgroup, and that should be grouped by Industry only.

    If this does not help, show the report design including the row and column group panel.