Expression to Change background color based on condition

  • hi,
    I have a pareameter  called percentage in a report ( when we type 1 in the "percentage")

    this parameter needs to compare the two columns ( percentage and week percentage)

    something like below:

    SWITCH((Fields!WeekPercentage.Value>Parameters!Percentage.Value) &(Fields!Percentage.Value>Parameters!Percentage.Value) ,"RED","YELLOW")

    If weekpercentage and percentage columns > @percentage  then display background color to "red"else "yellow"

    This is not working ......can anyone post the correct  expression for this?

  • Instead of
    SWITCH((Fields!WeekPercentage.Value>Parameters!Percentage.Value) &(Fields!Percentage.Value>Parameters!Percentage.Value) ,"RED","YELLOW")
    try
    IIF((Fields!WeekPercentage.Value>Parameters!Percentage.Value And Fields!Percentage.Value>Parameters!Percentage.Value ,"RED","YELLOW")

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

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