Sample 16-B: Top Data Values
This sample report fragment demonstrates the basic use of the TOP command. The report is based on the Sample Basic database.
Measures
Actual Budget
Jan Dec Jan Dec
======== ======== ======== ========
New York 100-10 262 271 260 250
200-40 175 312 200 320
400-10 101 89 120 90
400-20 94 133 110 150
300-10 111 309 100 210
400-30 54 52 70 60
300-20 (113) (189) (70) (150)
200-10 (172) (224) (170) (210)
Massachusetts 100-10 367 390 360 360
200-40 100 87 110 80
400-10 29 29 40 40
400-30 29 25 40 30
300-10 17 7 30 10
200-10 (23) (20) (10) (10)
...
East 100-10 837 867 860 830
200-40 267 383 310 400
400-10 215 201 280 230
400-30 157 167 210 200
300-10 177 368 190 270
400-20 94 133 110 150
200-20 80 79 100 110
100-20 67 122 70 110
100-30 20 37 30 50
300-30 34 12 30 20
Use the report script TOP.REP
, reproduced here, to create Sample 16-B:
<Sym
//Suppress shared members from displaying
<Supshare
<Column (Scenario, Year)
Actual Budget
Jan Dec
<Row (Market, Product)
<Desc Market
//Use bottom level of products
<DimBottom Product
<Top (10, @DataColumn(3))
!
The TOP command specifies that only the ten highest data values are returned for each row grouping, based on the target data values specified in column three (Budget, Jan).
This report script, TOP.REP
, is available in the \
ARBORPATH
\App\Sample\Basic
directory.