I am new to Stackoverflow and I am fairly new to using SSRS and report builder. I am trying to change the background color based on values in 2 different cells, but it does not seem to work. I have tried using an Iif statement with a nested Switch statement, but this does not seem to work. I also tried using just a SWITCH statement, but that just gives me fields with no color at all.
What I am trying to achieve is that if the value in the "excav" column is "EX01", it must follow a different set of rules. Ways I have tried it:
=SWITCH(
Fields![excav].value = "ex01" and Fields!tons.Value < 500 , "Red",
Fields![excav].value = "ex01" and Fields!tons.Value >= 500 and Fields!tons.Value < 1000, "Yellow",
Fields![excav].value = "ex01" and Fields!tons.Value >= 1000, "Green",
Fields!tons.Value < 1840, "Red",
Fields!tons.Value >= 1840 and Fields!tons.Value < 2300 , "yellow",
Fields!tons.Value >= 2300, "Green")
Result In this instance, it completely ignores the conditions for "ex01"
=Iif(SWITCH(
Fields!excav.value = "ex01" and Fields!tons.Value < 500 , "Red",
Fields!excav.value = "ex01" and Fields!tons.Value >= 500 and Fields!tons.Value < 1000, "Yellow",
Fields!excav.value = "ex01" and Fields!tons.Value >= 1000, "Green"),
SWITCH(
Fields!tons.Value < 1840, "Red",
Fields!tons.Value >= 1840 and Fields!tons.Value < 2300 , "yellow",
Fields!tons.Value >= 2300, "Green"),"No Color")
Result In this instance, it ignores all conditions and goes straight to the "No Color" condition.
Any Assistance would be greatly appreciated.