Groups | Blog | Home
all groups > sql server reporting services > september 2007 >

sql server reporting services : Stupid SUM question


Carl Henthorn
9/26/2007 3:16:01 PM
I have a table with one GROUP row in it. It is supposed to show results of
who is a preferred vendor vs non-preferred vendor, sales amounts for the
group, and their percentage of the whole. It shuld look like this:

Vendor Sales percentage
Preferred $9,000.00 90%
Non-Preferred $1,000.00 10%

The field expression for Sales is sum(fields!sales.value). I cant seem to
get the percentage expression correct. I have to do the percentage calc in
the table field, so I first went with
=formatpercent(fields!sales.value/sum(fields!sales.value), 2), but that was
only taking a random sales amount and dividing it by the sum.

I need to get the sum of sales for the given vendor type, and divide it by
the sum of all vendor types. What is the correct expression?

Mike G.
9/27/2007 12:00:00 AM
Investigate the second argument of the sum function: scope.

=sum(field,nameofthegroup) / sum(field,nameofthetable)

Mike G.


[quoted text, click to view]

AddThis Social Bookmark Button