Previous
Previous
 
Next
Next

Objects that Support the Use of Hierarchies

Typically, variables are dimensioned by hierarchical objects. For example, you might have a sales variable that is dimensioned by geog, time, and product. The geog dimension might have two hierarchies (one for political divisions and another for sales regions) and each of these hierarchies could have several levels with the top level of the political geography hierarchy being All Country and the top level of the sales geography hierarchy being All Regions. Example: Defining and Populating a Hierarchical Dimension Named geog illustrates defining and populating this type of hierarchical geography dimension.

Defining and Populating a Hierarchical Dimension Named geog

DEFINE geog DIMENSION TEXT
LD A dimension with two hierarchies for geography
"Populate the dimension with City, State, Region, and Country values 
MAINTAIN geog ADD 'Boston' 'Springfield' 'Hartford' 'Mansfield' 'Montreal' 'Walla Walla' 'Portland' 'Oakland' 'San Diego' 'MA' 'CT' 'WA' 'CA' 'Quebec' 'East' 'West' 'All Regions' 'USA' 'Canada' 'All Country'
 
"Display the values in geog
 
REPORT geog
 
GEOG
--------------
Boston
Springfield
Hartford
Mansfield
Montreal
Walla Walla
Portland
Oakland
San Diego
MA
CT
WA
CA
Quebec
East
West
All Regions
USA
Canada
All Country
 

Typically, after you define a hierarchical dimension, you define the following objects for that dimension: