R – How to get an average for a row in a matrix


Have a matrix report now that has
Position, Hours and Wages for a location for a month.
There may be any number of locations…that's why I'm starting with a Matrix report…the user may chose up to 50 locations to view.

                   Location 1         Location 2
               Total Hrs Amount     Total Hrs Amount
    Position1  441.68    $4,201.46  556.73    $6,103.67

We would like to get an average by position for that month, like so

                   Location 1         Location 2            Avg
               Total Hrs Amount     Total Hrs Amount       Avg Hrs 
    Position1  441.68    $4,201.46  556.73    $6,103.67    499.20

Can't quite figure out how to get this to work in SSRS 2005…

Best Solution

You could have a calculated field with formula (rs!localtion1Hrs + rs!location2hrs) / 2.


The query used to show the report can have this field as calculated column.

Related Question