SSRS Conditional Formatting of a cell with Multiple Conditions

  • Please help. I've been spinning my wheels. I would to highlight a field based on the field value, or null value (datetime field) and the value (text field) of another cell. All 3 conditions must be true then highlight datetime cell a color.

    Conditions in datetime field to check are:

    1.Null value and or the date is < today() ( date is in the past)

    AND

    Condition for text field:

    1.If field "X" = value "Y" then highlight the datetime field "Pink"

    This is what I have tried already:

    =Switch(IsNothing(Fields!resource_nextdate.Value) AND (Fields!SR_Status.Value = "Scheduled", “Yellow”, IsNothing(Fields!resource_nextdate.Value) AND (Fields!SR_Status.Value = "In Progress", “Red”

    or

    =IIF((Fields!resource_nextdate.Value < today() AND (Fields!SR_Status.Value.Value="New" OR Fields!SR_Status.Value.Value="Scheduled")),"Pink", IIF((Fields!resource_nextdate.Value < today() AND Fields!SR_Status.Value.Value="New"), "Red", "White"))

    PLEASE HELP.

  • Have you tried a format like this for Switch?

    =Switch( (Fields!resource_nextdate.VALUE Is Nothing OR Fields!resource_nextdate.Value < today() ) AND Fields!SR_Status.Value = "Scheduled", “Yellow”,

    (Fields!resource_nextdate.VALUE Is Nothing OR Fields!resource_nextdate.Value < today() ) AND Fields!SR_Status.Value = "In Progress", “Red”,

    ...and so on)

    The Switch example you posted probably wouldn't work because the parentheses weren't right. Here is a parenthesis-happier version:

    =Switch(IsNothing(Fields!resource_nextdate.Value) AND Fields!SR_Status.Value = "Scheduled", “Yellow”,

    IsNothing(Fields!resource_nextdate.Value) AND Fields!SR_Status.Value = "In Progress", “Red”)

    It also might not work because IsNothing returns a true or false - you might need something like

    IsNothing(Fields!resource_nextdate.Value) = True AND ...

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

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