What I'm trying to do is summarize several fields from a query at the variable level due to multiple calculations in my report (some additions, some subtractions).
For example, I'm trying to sum a financial value which has 3 conditions I need to check. I tried creating a variable and assigning it an expression of:
=Sum(IIf((Fields!Year.Value, "Query_Name") = Parameters!Year AND (Fields!Period.Value, "Query_Name") = Parameters!Period AND (Fields!Type.Value, "Query_Name") = Parameters!Type, (Fields!Amount.Value, "Query_Name"), 0))
I'm checking to see if the year, period and type (budget or actual) are correct and then I want to sum the values. It isn't working so I'm wondering what I'm doing wrong.
I do have multiple datasets in the report, however I'm referencing the correct one each time. Is this not possible or am I doing this incorrectly?
Parameters!Year
above - this should beParameters!Year.Value
. It looks like you're referencing the Field values correctly, just not the Parameter ones. – Ian Preston