Alex Alcala
Alex Alcala

Reputation: 17

Subtracting of a SUM?

I was wondering if I could perform this algebraic use, Here is the ones I am trying to perform with.

JCCM.BilledAmt + JCCM.udGEACrev As REVENUE_2,
(JCCM.udGEACrev + JCCM.BilledAmt) - JCCP.ActualCost As BilledCostDifference,

I tried adding REVENUE_2 between the brackets but the Report Builder does not take it as a column

Upvotes: 1

Views: 66

Answers (1)

Crazy Cucumber
Crazy Cucumber

Reputation: 479

Yes.

  1. Add a calculated field to your dataset:
    -Right click dataset -> Add Calculated Field
  2. Enter the following values in the dialog that pops up:
    -Field name: REVENUE_2
    -Field source: Fields!JCCM.BilledAmt.Value + Fields!JCCM.udGEACrev.Value
  3. Add another calculated field with the following values:
    -Field name: BilledCostDifference
    -Field source: Fields!REVENUE_2.Value - Fields!JCCP.ActualCost.Value
  4. Drag the second calculated field to your report.

NOTE:
SSRS will not recognize the first calculated field you added unless you hit OK. So add the first calculated field, hit OK, add the second calculated field.

Upvotes: 1

Related Questions