Using a formula as a filter to hide or display columns and rows
This example uses a formula to compare a value for sales volume with an entered value. Rows containing sales volumes that are smaller than the entered value are hidden. This form of filtering is necessary because the required filter depends on more than one cube.
This example uses the Sales and Finance cubes of the Samples application.
- Create a report and create a standard slice on the Finance cube. Add Unit as the Rows hierarchy.
- Click 1st Segment column. In the list designer, click the icon and select . Click the icon. in the
- Add Account as the Columns hierarchy.
- Click 1st Segment column. In the list designer, select . Click the icon and then click . in the
- Drag the slice to cell B8, and then extend the rows hyperblock to cell F8.
- Click cell D8 and then click the icon on the Objects toolbar.
- Select Cell values as the formula type and Sales as the cube.
- Click Profit. In the Selection column, select the Sales Volume element. and select
- Click Version. In the Selection column, select the Actual element. and select
- Click Formula. Specify =B8 in the Selection column. and select
-
In cell F8, specify
=IF(D8>=C5,TRUE,FALSE)
- Right-click the header of row 8 and select Rows. Select the Formula check box and specify =F8.
- In Cell B5, specify Sales volume bigger than:
- Remove cell protection from cell C5.
- In View mode, specify a value in cell C5 that is greater than at least one of the sales volume values. Rows containing lesser values are hidden.