Alternative Row Shading in Web Intelligence Reports

In a previous post I showed how we can create sparklines in Web Intelligence documents using tables and sections.  This unique approach makes it difficult to enable alternative row shading for tables and a workaround was required.  This post will show how you can easily enable alternative row shading if you happened to utilize the sparklines approach.

The first step is to create a new measure variable.  Click the Data Access tab and click the New Variable button and select Measure.

2015-10-19_11-15-34

Name the variable AlternativeRow and provide the following formula in the Formula section:

=Odd(RunningCount([Business Area]))

The RunningCount function returns a sequential integer for each new Business Area value, so for each row it will increment 1, 2, 3, etc.

The Odd function will return 0 or 1 depending upon whether the value returned from the RunningCount function is odd or even.

2015-10-19_11-20-13

After the variable is saved we can apply the conditional formatting.  Click the Analysis tab and select the Conditional tab and click the New Rule button.  Name the new rule AlternativeRow.

2015-10-19_11-24-04

Click the button next to the Filtered object or cell field and select the Select an object or variable option and choose the AlternativeRow variable from the Available Objects window.

Change the background color and ensure the other formatting is as you want it and click the OK button and apply the formatting to the columns in the table.

The results should look similar to those below:

2015-10-19_11-38-28

 

Leave a comment