I've got an expression that displays the summation of the values from my field: total
="Harvest Total: " & CStr(Format(Sum(Fields!total.Value),"#,##0"))
But I want to subtract from this total the total summation for a specific value in another field: WeaponType
So I've tried to rewrite the expression in the following way:
="Harvest Total: " & CStr (Format((Sum(Fields!total.Value) - IIF(Fields!WeaponType.Value="Archery",SUM(Fields!total.Value),Nothing)),"#,##0"))
Unfortunately, this expression does not give me an error and when I run the report, it returns a value of 0.
And I tried to reverse the options after the IIF
:
="Harvest Total: " & CStr (Format((Sum(Fields!total.Value) - IIF(Fields!WeaponType.Value="Archery",Nothing,SUM(Fields!total.Value))),"#,##0"))
This reversal does not have an affect either as it is returning the same value as my original expression.
Any ideas as to what I am doing wrong with this expression?