I have an SSRS report which I want to sum values of a field, but only if the value of another field is equal to 1, as I have made the report output a row number for each row. Bascially, I'm trying to sum the distinct values to come up with a total. Screenshot below. I'm getting an error for orders with more than 1 item. My expression used to calculate the Ship Cost (red text) is as follows
=SUM(IIF(Fields!RowNumber.Value = 1, Fields!WEIGHT.Value, 0))
But I'm getting the #Error. The cell that has the text #Error should be reading $11.25.