简体   繁体   中英

Total Average over Row Average SSRS

After looking online, I did not find straight answer. I have a table matrix showing Technicians Total Completed Visits which I divided by the Working Days to get the average number of jobs per day.

I then grouped this by their 'Area Sales Manager' and used the same calculation for the ASM Average but it is not what I want.

Calculation on the Technician Level: =SUM(Fields!WH_JobsComplete.Value)/COUNTDISTINCT(Fields!DailySummaryDate.Value)

This just gives me the Total Overall Average. I want to see the Average of the Average at the ASM Total level for the Technicians that belong to them. (rows below)

I will attach an image to show my current results vs the expected result. Please help with the Cell Expression for this?

在此处输入图片说明

Report: enter image description here

I haven't tested this, but I believe you will just need to define a scope for each aggregate that is used in the current expression. That scope should be the group level that is separating your ASM groups. So the expression would look something like the following.

=SUM(Fields!WH_JobsComplete.Value, "ASMGroup")/COUNTDISTINCT(Fields!DailySummaryDate.Value, "ASMGroup")

You should be able to directly reference the group in each aggregate. If that value is not provided, it defaults to the outermost scope.

SUM Documentation

CountDistict Documentation

On second look, I may have misinterpreted the issue. If you'd simply like the average -- it may be easier to use AVG on the textbox itself. Not entirely sure about your layout, but the following should work.

=AVG(ReportItems!JobsPerDayAverageTextbox.Value)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM