Skip to main content

Legacy Template: Traffic Light Variance Reporting

How to add Traffic light style background highlighting in a Legacy Template

Written by Mick Devine
Updated this week

NOTE 💬The instructions on this page apply to the Legacy Designer.

For a modern approach to traffic‑light variance reporting, use Dynamic Templates. See the following articles for guidance:

Traffic Light variance reporting is a concept where you can use traffic light ratings as a visual indicator on your variances. A simple combination of colours can indicate whether your variances are Unfavourable (Red), On Track (Amber), or Favourable (Green).

In this video we will add a conditional formatting rule to the $ variance column. The actual condition is based on the % variance value. In some reports the % variance column may not be displayed, but as this video shows, you can use any available data, not just that which is in the column you apply the rule to.

Code Snippet

The following code snippet is referenced in the video and can be used to copy into the designer.

Iif(
[RowItemTypeId] == 'Kpi', ?,
[AccountLevel] == ? or ([HasChilds] And [ReportLevel] > [AccountLevel]), ?,
[ReplaceMeWithFieldName] == ?, ?,
[ReplaceMeWithFieldName] > 0.2, rgb(140, 221, 192),
[ReplaceMeWithFieldName] > -0.2, rgb(255, 213, 113),
rgb(252, 179, 179))

Did this answer your question?