Reporting Services 2005 Subtracts 2 Values ​​in a Table

I have a list of fees displayed in a table object. I would like to show the difference between the two bids in a textbox (not sure if this is happening in the table footer or group footer). I can sum the values ​​easily, but I can't see how I can subtract the values. In this example, let me say that I would like to show the difference in license fee and registration fee (999-333). How can I do this using groups / filters, etc.? BTW I want to do this at the report level, not in a stored procedure! Thanks in advance...

It looks like this:

FeeDescription    FeeValue
License           $999.00 
Registration      $333.00 
Inspection        $444.00 
Title             $555.00 
Tire Fee          $5.00 
Battery Fee       $1.50 
MVWEA (Lemon Law) $2.00 

      

0


a source to share


2 answers


I am assuming you are using a table. Thus, you can perform computation with the expression in the corresponding Value Value property. For line item level: =Fields!License.Value - Fields!Registration.Value

. For line group level: =sum(Fields!License.Value - Fields!Registration.Value)

.



+1


a source


something like this should work



=sum(iif(Fields!FeeDescription="License" or Fields!FeeDescription="Registration",Fields!FeeValue,0))

      

0


a source







All Articles