Changing Data Bar Colors based on Conditions in Inforiver Matrix

Data bars are an effective way of visually representing our datasets in either the table or matrix. Especially when we want to visually convey our dataset in terms of positive values and negative values.

In Power BI we can do this by selecting the Conditional formatting option under the Visualizations tab, and then selecting the Data bars option. Once we select our bar colors, the next step would be to click ok, and we get our data visualized in data bars:

While this is an extremely useful feature of Power BI, a problem arises when we want to change the bar colors based on conditions.

Say for example we have a column with values ranging between 0 to 100. We then want to have data bars with different colors as per the below conditions:

Red -> if (value) between 0 to 30,

Yellow -> if (value) between 30 to 60,

Green -> if (value) between 60 to 100.

Essentially, we want an If Condition or Rules based conditional formatting in data bars, with the option to color data bars based on our required conditions. Such a feature would allow us to visualize our dataset even more effectively than just simply having data bars.

Currently Power BI does not support this feature of using Rules based conditional formatting in data bars.

However, this can be achieved in Inforiver via a simple workaround.

Let us illustrate this with an example.

1. Under the Conditional Formatting tab, we will choose the Create Rule option:

2. Next, we will select Classification option under the Format by dropdown:

3. Then under Display we will select Icon Set -> Any Icon set. Once we select our icons we click Apply:

4. Now that we have applied the icons to our column, we will then select the whole column and add a bar chart to it. The bar chart option is located under the Charts section:

5. Finally, we can now see that our bar chart has been formatted like data bars but with actual conditional formatting:

  1. We even have the option of further customizing our Bar Chart by going to the Customize tab. The Customize tab will become visible only when we select the Bar Chart column:

1