Anton
Anton

Reputation: 2138

SSRS report Row grouping and average value for each group

I have a report with a row grouping in a table. Now I want to add an avarage value for each group. E.g. there's a table with data on employees visiting an office:

Name | In | Out

John | 2012-10-30 04:49:35.000 | 2012-10-30 05:49:35.000
Mark | 2012-10-30 04:69:35.000 | 2012-10-30 04:79:35.000
John | 2012-12-15 04:49:35.000 | 2012-10-30 04:49:35.000

I've made a grouping in my report on Name and get amount of visits for each employee:

Name | Visits
John | 2
Mark | 1

Now a need to add a column with an avarege time each employee spent in the office.

is it possible?

Upvotes: 0

Views: 1488

Answers (1)

Neil
Neil

Reputation: 919

I would recommend adding a time spent column in your query. Then you could use the AVG function in SSRS to get what you need. You could probably just do an average on in - out within SSRS, but I always try to do the least amount of work in SSRS in order to boost performance.

Upvotes: 1

Related Questions