Showing posts with label calculation. Show all posts
Showing posts with label calculation. Show all posts

Wednesday, March 28, 2012

Report designer - how you refer to an existing field in calculation

Hi,

This seems simple but can't find. Say in my report I have 3 fields(A,B and C).

In field C I want to give a calcultion based on fields A and B. Say field C value = A+B

How do you do this? In expressions I couldn't see existing report fields, it only shows dataset columns.

Sonny

Hi Sonny,

You have several options to do something like this.

You can create a calculated field in your dataset:

In your dataset window, right click on the dataset and select Add Type in the name (FieldC) Select Calculated Field and type in =Fields!FieldA.Value + Fields!FieldB.Value In the textbox where you want FieldC to be, type in =Fields!FieldC.Value|||

Hi Jessica,

Thanks for the answer.

Sonny

Report designer - how you refer to an existing field in calculation

Hi,

This seems simple but can't find. Say in my report I have 3 fields(A,B and C).

In field C I want to give a calcultion based on fields A and B. Say field C value = A+B

How do you do this? In expressions I couldn't see existing report fields, it only shows dataset columns.

Sonny

Hi Sonny,

You have several options to do something like this.

You can create a calculated field in your dataset:

In your dataset window, right click on the dataset and select Add Type in the name (FieldC) Select Calculated Field and type in =Fields!FieldA.Value + Fields!FieldB.Value In the textbox where you want FieldC to be, type in =Fields!FieldC.Value|||

Hi Jessica,

Thanks for the answer.

Sonny

Friday, March 23, 2012

Report Calculation of Percentage is Inaccurate

I have a report that Sums several columns and uses the sums of two of the
columns to calculate a simple percentage.
=Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
= 3781/4756
The resulting calculated percentage in the report is 76%. The actual
percentage is 79.4%.
I've searched MS Reporting Services site but can find nothing that addresses
calculation errors. Has anyone else had this problem? Does anyone know of a
fix for this?Could you put Sum(Fields!Col1.Value) and Sum(Fields!Col2.Value) into
separate textboxes to make sure they are 3781 and 4756?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:4B948010-B27C-45A4-95BA-C89DF5A2B25D@.microsoft.com...
>I have a report that Sums several columns and uses the sums of two of the
> columns to calculate a simple percentage.
> =Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
> = 3781/4756
> The resulting calculated percentage in the report is 76%. The actual
> percentage is 79.4%.
> I've searched MS Reporting Services site but can find nothing that
> addresses
> calculation errors. Has anyone else had this problem? Does anyone know
> of a
> fix for this?
>|||Thanks for your response, however, I finally figured it out ... I was asking
for a line item value to compute the summed values percentage. So Rpt Svcs
was grabbing the values from the 'First' record in the group instead of the
summed values for the 2 columns. The fix is something like this ...
=Sum( Fields!Col1Sum.Value )/SUM( Fields!Col2Sum.Value)
"Lev Semenets [MSFT]" wrote:
> Could you put Sum(Fields!Col1.Value) and Sum(Fields!Col2.Value) into
> separate textboxes to make sure they are 3781 and 4756?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:4B948010-B27C-45A4-95BA-C89DF5A2B25D@.microsoft.com...
> >I have a report that Sums several columns and uses the sums of two of the
> > columns to calculate a simple percentage.
> > =Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
> > = 3781/4756
> > The resulting calculated percentage in the report is 76%. The actual
> > percentage is 79.4%.
> >
> > I've searched MS Reporting Services site but can find nothing that
> > addresses
> > calculation errors. Has anyone else had this problem? Does anyone know
> > of a
> > fix for this?
> >
>
>