Conditional Formatting on cells...HELP!

Hi All,

Fairly new user to web intelligence.

Had a look through the forum but unable to find anything I can use.

I would like to set conditional formatting on a column and highlight it yellow. I tried to create the below variable and then use it on the conditional formatting but it didn’t work.

=if isnull(date) or date = “” then 1 else 0

Can anyone point me to a useful link that I can follow?

Thanks


Ram56 (BOB member since 2019-02-05)

Hi Ram56

Welcome to the board!

I’m assuming you’re using Webi 4.2 and the app (eg not the html version). You can’t creation conditional formatting rules from the html version (trap for young players).

I’m also assuming that you want to highlight a different column to the date field. So you block has 2 fields, YourThingID and YourDateField.

First - you need to find out what if YourDateField is actually a date (eg it might be a date, or a string).
The easiest is from the report (eg not the query). Hover your mouse over the field name. That will tell you the type of field eg date, string etc.

Assuming it’s a date, then your variable (eg varCheckThis) formula just needs a slight tweak.

If IsNull([YourDateField]) then 1 else 0

If it’s a string, then use:

If ([YourDateField]) ="" then 1 else 0

Add your variable to the block, so that you get a variable answer for each record (eg 1 or 0).

Making the assumption that you want to highlight YourThingID if the date is null.

[list]Click on YourThingID.
From your Analysis tab, click on the Conditional “sub tab”.
Click New Rule …
In the Name field, change the default name to something that makes sense (even if you only have 1 rule, it’s a good habit to get into).
In the Description field, put a short blurb on what the formatting is designed to do - again make good habits whilst you can!
Use the button next to the Filtered object or cell name to select the name of your variable, eg varCheckThis). Remember - you want to highlight YourThingID in yellow, if varCheckThis =1 (eg the date is null).
In the Operands field, enter 1.
Click the Format button.
From the side menu, click the Background option.
From the color (because it’s American software) option, click the fill bucket and choose your colour, eg yellow.
Click OK to close the Formatting Rules Display dialogue box.
Click OK to close the Formatting Rule Editor dialogue box.
[/list]

Note that you can add further criteria to this rule, eg highlight yellow if null, highlight blue if in the future etc.

Hope that helps.


isingdeadpeople (BOB member since 2018-08-29)