When the following IIF
expression is true, the row gets a 1 and if false the row gets a 0.
=IIF(Fields!MatchField.Value = "No match" and Fields!X.Value >= 1000, 1, 0)
What I want is to calculate the total sum of the column. If I use the same expression in the column group, the sum is always 0. If I use the textbox value of the row like this:
=SUM(ReportItems!Textbox41.Value)
The report returns an error:
Aggregate functions can be used only on report items contained in page headers and footers
Update #1
I implemented the solution from the link in Kavin's answer, but every total_sum is still 0.
Public Total_lookup_Sum As Integer = 0
Public Function Lookup_Sum(ByVal value As Integer) As Integer
Total_lookup_Sum = Total_lookup_Sum + value
Return value
End Function