I am using SSRS 2008 R2 and struggling with aggregation inside the lookup function.
I found the below code which perfectly:
Function SumLookup(ByVal items As Object()) As Decimal
If items Is Nothing Then
Dim suma As Decimal = New Decimal()
suma = 0
For Each item As Object In items
suma += Convert.ToDecimal(item)
and in my tablix I have :
=Code.SumLookup(Lookupset(Fields!CLUSTER.Value, Fields!CLUSTER.Value, Fields!Q1_Dismissals.Value, "Dismissals"))
which returns the correct result but I now want the sum of all the results.
My result look like this:
I would like to have results which look like the below but the total line is coming out wrong (I just get the 3).
Can anyone see what I doing wrong and advise if it is possible to get the total?
Do I need to change the custom code itself or add a new custom code?
I appreciate your assistance.