Search code examples
sqlreporting-servicesssrs-2008

SSRS: Repeat Down Total from Matrix in all rows


Need some help in SSRS,

New to this so apologies ahead if not entirely up to scratch with answers.

I am trying to get the Total of a column and repeat the value of that total (Total Checks - see image) across all the rows.

Below is image:

enter image description here

I have tried multiple different ways, each time with failure.

Any help would be much appreciated.

Thanks,


Solution

  • Depending on where you are getting your data from, you have different options. For example, within SQL you could use windowed functions:

    select Date
          ,Checker
          ,sum(Checker) over () as TotalChecks
          ,sum(Checker) over (partition by Date) as TotalChecksByDate
    from table
    

    or within SSRS expressions by explicitly stating your scope, either for the dataset as a whole:

    =sum(Fields!Checker.Value, "YourDataset")
    

    or just for the grouping within your table:

    =sum(Fields!Checker.Value, "YourTableGroupName")