OBIEE11G : conditional-formatting for rows

What is Conditional formatting? In OBIEE, its actually applying GUI formats to our analyses columns like $, %, background color etc, based on a single condition or we can say using single logical operand. In this blog, will discuss the possibility of using multiple conditions together to get 1 specific row-column formatting. In OBIEE we get many complex requirements (Table/Pivot) like highlighting the value for Year = 2015 and region = East and data range from 0-200, then orange, 201-400 then green. But using OBIEE GUI conditional Formatting this is not feasible. We can do hit/trials by writing one condition , then override it with another condition, to get our results but it does not always work. OBIEE11g GUI doesn’t allow us to write complex conditions.

For example: I have a business requirement to highlight row where region = EAST, and we have to show data with different colors in different ranges (like image below) :

If i try to achieve it using OBIEE GUI, column properties-> Conditional Format option, it will be writing multiple condition to override one another like:


But if we notice the conditions, it will effect all values of table which have value between data ranges, and not specifically only row which has  value EAST, like below:

Now lets proceed to achieve our complex requirement by playing with Advanced Tab->  Analysis XML.OBIEE reports are stored in an XML format. We can read it and find lot of information about functionality the GUI doesn’t allow to perform but can be coded manually.If you take out a copy of your report you will find that conditions are written in conditional formatting blocks, using logical operators like “Equal”, “Between”.

 
 We can similarly apply “AND” operator and write a different format condition like below:

Now when we go to column properties of data range column and see conditional Format tab, we found different condition, like sawx:exprsawx:logicaland. This explains usage of AND Operator.
If you try to edit it from OBIEE GUI, you cannot do it as formula is not seen. Hence, if again any change required, go to Advanced XML and make changes.


 

Note: Always keep a backup of your XML , before making any changes to it, since it not a play game.

Thanks 🙂


 

Advertisements