Sample 17: Restricting Rows
The following report demonstrates the use of the RESTRICT conditional retrieval command in a report script. For a discussion of various issues related to use of the RESTRICT command, see "Restricting and Ordering Data Values" in the Designing and Maintaining Essbase Cubes.
Measures
Actual Budget
Jan Dec Jan Dec
======== ======== ======== ========
East 200 158 233 280 340
300 184 277 240 210
Diet 181 213 200 240
South 300 188 213 270 240
400 #Missing #Missing #Missing #Missing
Use the following script to create Sample 17:
<Sym
<Column (Scenario, Year)
Actual Budget
Jan Dec
<Row (Market, Product)
<Ichildren Market
<Ichildren Product
<Restrict (@DATACOLUMN(3) < $300.00 )
!
The RESTRICT command specifies that only data values that are less than $300.00 are returned for each row grouping, based on the target data values specified in column three (Budget, Jan). Notice that no row dimension is selected here, so the report output defaults to the innermost row.
This report script, RESTRICT.REP
, is available in the \
ARBORPATH
\App\Sample\Basic
directory.