June 25, 2010 at 1:49 am
Hi
I'm trying to add a percentage of total column in a simple SSRS report (SSQL 2005) and can't see a logical way to do it as there are no GroupSum or Percentage of Total functions
e.g. of Table
Group = Fields!Loan_Cat.Value
Col 1 = sum(Fields!pyofbl.Value)
Col 2 = Line Total as a % Total...which is what I need
Any help would be appreciated 🙂
June 25, 2010 at 4:14 am
Hi ,
I think I know what you mean.
The group total would be sum(Fields!Loan_Cat.Value)
The total grand total would be the same expression but you would place it in the footer of your table
Rename this field, in the cell properties under name and call it say GT .
You can then call this calculated cell to use in your percentage expression.
in a field next to the the group sum field create a field with the expression
sum( Fields!Loan_Cat.Value) / ReportItems!GT.Value
Hope this helps!
June 25, 2010 at 5:27 am
Thanks..that's very helpfuL!
September 7, 2010 at 10:06 am
Hi,
I am trying to replicate your suggestion of adding the "Percent total", but could not implement what've suggested. I have attached an Image file of the report, and have applied red color in places where i want to total the Percent.
Thanks
September 8, 2010 at 9:21 am
Hello,
Thanks for the help. I have tried what you've suggested, and unfortunately didn't get the correct total - (56%).
I have attached the result in an image file below for your reference. Also, what do you mean
by add 'P2' to its format ?
Thanks
September 8, 2010 at 12:52 pm
P2 is shorthand for percent, 2 decimal places. You can go into the text box dialog and do the numeric formatting through the GUI, or go the the text box properties and under format type "p2" or if you don't want any decimal places type "p0"
FYI there is also shorthand for other types of formats
C2 is for currency to 2 decimal places
N0 is numeric formatting, zero decimal places
etc.
As you get better at SSRS you will find that these are a faster way to format than the GUI, especially since you can highlight multiple cells at the same time and type in the shorthand formatting code and have them all done whereas using the GUI you have to do them one at a time.
September 8, 2010 at 12:55 pm
have tried what you've suggested, and unfortunately didn't get the correct total - (56%).
My math 208 / 1534 is the 13.5% that your picture shows. Percent calculations are not additive, meaning you cannot take the sum of the columns and get the correct number.
September 8, 2010 at 1:10 pm
Hi,
So did you got it?? or still stuck ??
Regards,
Amar Sale
September 8, 2010 at 1:20 pm
Thanks for the explanation, it's well understood.
September 8, 2010 at 1:21 pm
sure, i got it. Thanks
September 8, 2010 at 1:22 pm
Thanks, it makes sense.
September 8, 2010 at 1:25 pm
Thanks, it made sense.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply