Friday, December 02, 2005

calculated sum - MSDN

calculated sum - MSDN: "Not sure if this solution will work for you, but you can add a Calculated Field to the Data Set, say: 'FilteredQty', defined as (assuming Quantity is an integer):

CInt(iif(Fields!Country.Value = 'USA', Fields!Quantity.Value, 0))

Then in your report you can use this expression:

Sum(Fields!FilteredQty.Value), wich should return 4 rather than 10

To make it dynamic, 'USA' can be replaced by a report parameter."

No comments: