Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I exclude multiple values in a sum, depending on values in 2 columns in SSRS 2005?
    text
    copied!<p>I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so </p> <pre><code>`=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))` </code></pre> <p>based on a value in 1 column as per the following code in my SSRS 2005 app:</p> <pre><code> 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 </code></pre> <p>Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".</p> <p>Since I already exclude value based on 1 column called CATEGORY, how do I change my <code>=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))</code> to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?</p> <p>i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload