Logo DWBI.org Login / Sign Up
Sign Up
Have Login?
Login
New Account?
Recovery
Go to Login
SAP Business Objects

Conditional Column Hiding in BO 3.1 Webi Report

Updated on Sep 30, 2020

In several reporting scenarios, BO developers may require to hide columns in a block based on specific conditions. This article will illustrate an example for doing this.

We will be using the standard efashion universe. We have developed a report with Store Name, Lines, Quantity Sold and Sales Revenue with a filter

Lines = 'Accessories' in Query panel. The report will look as below.

Simple report from eFashion Universe
Simple report from eFashion Universe

Now, I want that the Sales Revenue column will only be displayed, when the Lines is ‘Accessories’. For all other lines, this column will be hidden. To achieve this, the steps will be:

  • Click on the Sales Revenue column and modify the formula for the column(=[Sales Revenue] initially) in the function panel as:
= If( [Lines] = ”Accessories” ; [Sales Revenue] ; hide )
Modifying the formula for hiding column
Modifying the formula for hiding column
  • Click on the header of the column and modify its formula as:
= If( [Lines] = "Accessories" ; NameOf( [Sales Revenue] ) ; "hide" )
Modify Header Column Formula
Modify Header Column Formula
  • Now create an alerter and put the condition as Cell Contents Equal to hide
Alerter Editor
Alerter Editor
  • Click on Format and set the font, background and the borders as colorless
Alerter Display
Alerter Display
Activating Alerter
Activating Alerter
  • Now refresh the report and change the filter to anything other than Accessories (I have taken Sweaters). The sales revenue column will no longer be visible
Report Display
Report Display
  • Now again refresh the report and put the filter as Accessories, the column will become visible again
Hiding Column Display
Hiding Column Display

The conditional hiding may be based upon various conditions (like Report Filter, Input Control based etc) where the formula for the column will change a bit. However the implementation of the alerter will remain the same.