Indicator Expression

  • I want to use an expression where the indicator should only select one of the three values as the data has lot of NULLS and I don't want it to use that.

    Expression

    =Switch(Fields!Trend.Value = "UP" ,1) OR SWITCH(Fields!Trend.Value = "DOWN", 2) OR SWITCH(Fields!Trend.Value = "EVEN", 3)

    Here are the indicator stats :

    1 = Red

    2 = Green

    3 = Amber

    But I somehow get a blank . NO indicator displays . I am sure , its messing up somewhere and taking into account the NULL . How can I force it to only use only out of the three values in that column and not the NULL.

    P. S: I don't want to add a filter as other column calculations are based on it. Expression on this text box (indicator) is my only choice

  • sharonsql2013 (11/13/2014)


    I want to use an expression where the indicator should only select one of the three values as the data has lot of NULLS and I don't want it to use that.

    Expression

    =Switch(Fields!Trend.Value = "UP" ,1) OR SWITCH(Fields!Trend.Value = "DOWN", 2) OR SWITCH(Fields!Trend.Value = "EVEN", 3)

    Here are the indicator stats :

    1 = Red

    2 = Green

    3 = Amber

    But I somehow get a blank . NO indicator displays . I am sure , its messing up somewhere and taking into account the NULL . How can I force it to only use only out of the three values in that column and not the NULL.

    P. S: I don't want to add a filter as other column calculations are based on it. Expression on this text box (indicator) is my only choice

    How are you using the result of the Expression? As coded, it should return a Boolean. Are you using it in a true/false test somewhere? Or do you want something like this:

    =Switch(Fields!Trend.Value = "UP" ,1, Fields!Trend.Value = "DOWN", 2, Fields!Trend.Value = "EVEN", 3)

    Gerald Britton, Pluralsight courses

  • Thank you

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply