Hi all,
I have a value in business objects webi that’s split by month. Is it possible to do conditional formatting, higher in green, lower in red based on the previous month?
e.g, Invoice Value for march 2022 is 5000, for April 2022 is 5500, therefore the 5500 should be green as it’s higher than March’s value.
create a variable called prevMeasure
eg =previous([your_measure])
then simply compare your measure to that variable within the conditional formatting screen
eg your_measure Greater than prevMeasure
set the output format to suit
1 Like
Sure. I created a report based on the following free-hand SQL in order to have some data to work with.
SELECT '202201' AS [Year Month], 3000 AS [Invoice Value]
UNION
SELECT '202202', 2500
UNION
SELECT '202203', 5000
UNION
SELECT '202204', 5500
UNION
SELECT '202205', 4750
UNION
SELECT '202206', 4750
You will need a variable to capture the previous invoice value. I called mine Var Previous Invoice Value…
=Previous([Invoice Value])
Next, create a Conditional Formatting rule…
This will turn the text of the column is it applied to green if greater than the previous month.
Click the “+ Add …” button in the upper left to add more conditions. I added two more; one to turn the text blue if equal to the previous month and another to turn the text red if less than the previous month.
That’s it.
You do not need the Var Previous Invoice Value object in your table. I just included it to make it clear what is happening.
A few things to note…
- You can uncheck the rule if you do not want it applied without deleting it.
- You can apply this conditional formatting to other columns (e.g. Year Month) which are not part of the conditional formatting.
Noel
1 Like
Thank you very much, that sorted it.