August 11, 2011 at 12:36 pm
Customer ProductSalesTotalUnits
2123$1030
2245$1230
2964$1430
2$3630 -- Avg of Total units per customer
8456$3050
8789$4050
8$7050
GrandTotal$10638
I need to average the total units field in grand total. When I just use average it gives me 38 (30+30+30+50+50/5).
But I need to calculate it as 40 (30+50/2).
I have grouping on Customer, so if I use
Avg(Fields!UnitsShipped.Value,”GrouponCustomer”) in grand total it is giving me error.
August 15, 2011 at 7:14 am
What is the error you are getting?
August 15, 2011 at 8:32 am
It is not giving me any error. It is just not displaying the average like I want. In the grand total it shows the average for Total Units column as 38 (30+30+30+50+50/5).
But I need to calculate it as 40 (30+50/2).
I just used Avg(TotalUnits).
August 15, 2011 at 1:18 pm
The AVG function works exactly as you described which is a bit annoying to say the least. Typically, if you want the real average you have to write the expression yourself. Try something like:
SUM(Fields!UnitsShipped.Value)/COUNT(Fields!UnitsShipped.Value)
in the grand total and you should get what you are looking for.
Good luck, Steve
August 15, 2011 at 2:08 pm
Hi Steve,
This still gives me the same value i.e. 38. It does the same way like average function do i.e. (30+30+30+50+50/5).
I need it to calculate 40 (30+50/2).
August 15, 2011 at 3:45 pm
Sorry, I read this too quickly the first time. I think this is what you are trying to accomplish:
August 16, 2011 at 12:51 pm
Thank you, I think this will help me.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply