SAP Lumira 2.0 – Visualization Tips & Tricks: Adding Context with Conditional Formatting
This blog is part of a series to highlight useful features, tips and tricks to assist with good data visualization practice in Lumira 2.0 Discovery.
The first blog in the series can be found here: SAP Lumira 2.0 Visualization Tips & Tricks: Adding Context with Reference Lines
Displaying visualizations with context is one of the key attributes to good and meaningful presentation. Very often, a chart or other visualization on its own can convey only part of the overall “data story”. One of the easiest ways to bring additional context and meaning to visualizations is by using the Lumira Conditional Formatting feature. This feature can be used to quickly highlight areas of concern (or success) in your data.
Conditional Formatting in Lumira
Consider the following sample Lumira Crosstab (table) visualization, which lists North American sales territories, sales regions and their number of “Units Sold”.
A simple list of numbers like this is informative but key insights and items for attention may not present themselves well on first glance – even with a comparatively small list like this.
If, for example, we wanted to call to attention any sales regions which had low amounts of Units Sold (say, 2,000 or less Units Sold) we could do this easily by using the Conditional Formatting capability in Lumira.
To implement this, we need to first create a Conditional Formatting rule by right-clicking on the original crosstab visualization and selecting Conditional Formatting:
This will produce the Conditional Formatting Settings dialog:
Press the “+” icon at the top-left to create a new Conditional Formatting rule.
On the resulting New Formatting Rule pop-up dialog, supply the following:
- A Conditional Formatting rule Name (“LE 2000” in the example below)
- The Measure or Dimension on which you want to apply the formatting update (the Measure “Units Sold” in the example below)
- A conditional operator and value (“less than or equal to” and “2000” in the example below)
- The desired formatting change if the above condition is met (red background fill color in the example below).
- Save and apply the new rule by pressing OK.
This would then produce the required result in the original crosstab (i.e. identifying and highlighting “Units Sold” values of 2,000 or less) as follows:
Conditional Formatting in Different Charts
Conditional formatting in Lumira is not limited to tabular visualizations, other visualizations support this useful feature also. To illustrate, simply right-click on the crosstab visualization and choose another chart (say, a column chart from the Chart Picker) :
This will result in the previous crosstab visualization being converted to a column chart – but with the conditional formatting rules still applied and reflected by highlighted chart columns instead of table cells:
Applying Multiple Conditional Formatting Rules
Multiple Conditional Formatting rules can be created and applied to a visualization if compound logical conditions are needed. For instance, if we switched the chart back to the crosstab from the example above:
Now, if we were no longer concerned about sales regions in Canada, we would need to exclude the formatting update from being applied to Canadian rows in the crosstab. One way of doing this is to create another rule to identify the Territory Dimension with value “NA-Canada” as follows:
This rule, would identify rows in the crosstab, which had a Territory value of “NA-Canada” and then apply a white background color to the measure for that row. If this rule were positioned to follow the previous (red background) rule, we should arrive at the desired crosstab result.
The rule order can be applied in the Conditional Formatting Settings dialog (which is displayed once any Conditional Formatting rule is created) as shown below:
You can vary the order of the rules to match your desired logical conditions by using the Up/Down arrows on the top-right of the Rule Manager. The rules are enforced from bottom order to top.
Therefore, in the example above, the “LE 2000” rule would be applied first to identify any “Units Sold” cells with a value less than or equal to 2,000 and color them with a red background. Then the “Canada” rule would be applied to identify any rows with a Territory of “NA-Canada” and revert their “Units Sold” cells back to a white color background. This would then achieve the desired crosstab result – i.e.:
Usage of this simple Conditional Formatting feature in SAP Lumira can bring so much more value to your visualizations by immediately highlighting specific results that may need priority follow-up actions.
Additional useful references for good visualization best practices in SAP Lumira can be found here:
“Creating High Impact Data Visualizations with SAP Lumira” – a recording of the webinar, presented by SAP’s Jacob Stark (for Lumira 1.x).
Thank you for all this interesting notes.
Any info on the release date?
Hi Silvain, Clint Vosloo said Lumira 2.0 is coming out 22nd August at SAUG's Brisbane Winter SIG
Is it possible to apply the Conditional formatting on dimension (Sales Region) as well based on the rule applied for Unit Sold measure?
I would be interested in the answer to this question as well.
Hello Lisa, Harish,
Yes, you can apply conditional formatting to multiple dimensions - just add a new rule as shown above.
Can I make the dimension also Red based on the measure value?
In the example shown if the Units sold is less than 2000 then color the units sold in red and also the region in Red. is that possible?
I am using a KPI indicator and i have a measure,if the value is less than 0.93 it should be red and above that should be green. I am able to make the whole tile green/red depending upon the value but i wanted to change the color of the value only not the full tile.