Reputation: 11
Working in Visual Studio 2012 to create a SSRS Business Intelligence Services Report.
Trying to do something like below where based on the value of one column, subtract the value of another column.
=iif(Fields!ACADEMIC_YEAR.Value=Parameters!ACADEMIC_YEAR.Value, Fields!TotalProspects_Dom.Value-iif(Fields!ACADEMIC_YEAR.Value=Parameters!ACADEMIC_YEAR.Value-1,Fields!TotalProspects_Dom.Value, 0),0)
Basically my table looks like:
essentially the table for the report is two rows, the current academic year and the previous academic year and I have to compare the two. Each row is made of columns representing the data for domestic and international data for a larger group.
Upvotes: 1
Views: 804
Reputation: 10860
I think you just need to have separate IIFs to determine the year.
= SUM(IIF(Fields!ACADEMIC_YEAR.Value = Parameters!ACADEMIC_YEAR.Value, Fields!TotalProspects_Dom.Value, 0)
- SUM(IIF(Fields!ACADEMIC_YEAR.Value = Parameters!ACADEMIC_YEAR.Value - 1, Fields!TotalProspects_Dom.Value, 0)
Upvotes: 1