Forum Discussion

amaiaita's avatar
amaiaita
Regular Visitor
3 years ago
Solved

Multiple Conditions for Conditional Background Fill of Cells

I am trying to get a column in my table to have a condition that if the value in it is the string "+ve" then the background is blue, and if the string is the word "-ve" then it is filled with Silver. This works when putting in only one condition as:

=((IIF(Fields!ID2017.Value="-ve","Silver","No Color"))

However, when attempting to put the second condition in as follows I either get an error or only the first condition works:

=((IIF(Fields!ID2017.Value="-ve","Silver","No Color")) Or (IIF(Fields!ID2017.Value="+ve","Blue","No Color")))

I have also tried:

=((IIF(Fields!ID2017.Value="-ve","Silver","No Color")) And (IIF(Fields!ID2017.Value="+ve","Blue","No Color")))

 

would really appreciate if someone was able to help!

  • So you would achieve this by nesting your IIF functions

     

    =IIF(Fields!ID2017.Value="-ve","Silver", IIF(Fields!ID2017.Value="+ve","Blue","No Color") )

     

     

2 Replies

  • So you would achieve this by nesting your IIF functions

     

    =IIF(Fields!ID2017.Value="-ve","Silver", IIF(Fields!ID2017.Value="+ve","Blue","No Color") )