I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so
`=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))`
based on a value in 1 column as per the following code in my SSRS 2005 app:
Public Shared Function ChangeWord(ByVal s As String) As String
Dim strBuilder As New System.Text.StringBuilder(s)
If s.Contains("Others") Then
strBuilder.Replace("Others", "Others (FIG NOT COUNTED)")
Return strBuilder.ToString()
Else
If s.Contains("Temporary Placement") Then
strBuilder.Replace("Temporary Placement", "Awaiting Progression")
Return strBuilder.ToString()
Else : Return s
End If
End If
End Function
Public Shared Function ExcludeOthers(ByVal rowDesc As String, ByVal rowVal As Integer) As Integer
If rowDesc.Contains("Others") Then
rowVal = 0
Return rowVal
Else
If rowDesc.Contains("Awaiting Progression") Then
rowVal = 0
Return rowVal
Else
Return rowVal
End If
End If
End Function
Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".
Since I already exclude value based on 1 column called CATEGORY, how do I change my =Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))
to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?
i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?