x

SSRS division

Need help with division in SSRS
Dividing numbers in ssrs don't give actual value instead it's rounding up the result. Example; 72102.17/13069110.48. I get 0.55 instaed of 0.0055. The expression i am using is :sum(Fields!ACECost.Value)/(ReportItems!ItemCost1.value))
more ▼

asked Aug 03, 2012 at 01:13 PM in Default

rena786 gravatar image

rena786
0 2 2 2

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Double check that your calculation is correct. I do not see sum(Fields!ACECost.Value)/(ReportItems!ItemCost1.value)) is with correct syntax. There seems to be a surplus closing parentheses ")". Other things to look at should be

  1. Do you want the division before Summation or after?
  2. Is there any special number format applied to the respective text box?
Other than that I do not see SSRS responding to the calculation like that.
more ▼

answered Aug 06, 2012 at 11:06 AM

Usman Butt gravatar image

Usman Butt
13.9k 6 8 14

(comments are locked)
10|1200 characters needed characters left

I prefer to use my query data set for all calculations and not field expressions. They are difficult to debug...

Is it not possible to change the underlying query to create the output for your field?
more ▼

answered Aug 03, 2012 at 01:31 PM

eghetto gravatar image

eghetto
2.1k 16 18 24

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x556

asked: Aug 03, 2012 at 01:13 PM

Seen: 1080 times

Last Updated: Aug 06, 2012 at 11:06 AM