![]() Previous |
![]() Next |
An inhier valueset is those values of the inhier dimension that are in each hierarchy. Example: Defining and Populating an inhier Valueset Named geog_inhier illustrates defining and populating this type of valueset.
An inhier variable is a BOOLEAN variable that is dimensioned by the hierarchical dimension and the hierlist dimension. For each hierarchy, it has a TRUE value for each dimension value that is in that hierarchy. Example: Defining and Populating an inhier Variable Named geog_inhiervar illustrates defining and populating this type of valueset
Example 1-6 Defining and Populating an inhier Valueset Named geog_inhier
"Define the valueset
DEFINE geog_inhier VALUESET geog <geog_hierlist>
"Using LIMIT commands, populate the valueset
LIMIT geog_inhier (geog_hierlist 'Political_Geog') REMOVE 'East' 'West' 'All Regions'
LIMIT geog_inhier (geog_hierlist 'Sales_Geog') REMOVE 'Canada' 'USA' 'All Country'
"Display the values in the valueset
REPORT W 20 geog_inhier
GEOG_HIERLIST GEOG_INHIER
-------------- --------------------
Political_Geog Boston
Springfield
Hartford
Mansfield
Montreal
Walla Walla
Portland
Oakland
San Diego
MA
CT
WA
CA
Quebec
USA
Canada
All Country
Sales_Geog Boston
Springfield
Hartford
Mansfield
Montreal
Walla Walla
Portland
Oakland
San Diego
MA
CT
WA
CA
Quebec
East
West
All Regions
Example 1-7 Defining and Populating an inhier Variable Named geog_inhiervar
DEFINE geog_inhiervar VARIABLE BOOLEAN <geog geog_hierlist>
"Using LIMIT commands and assignment statements, populate
" the variable
LIMIT geog_hierlist TO ALL
LIMIT geog_hierlist TO 'Political_Geog'
LIMIT geog TO 'East' 'West' 'All Regions'
geog_inhiervar = FALSE
LIMIT geog COMPLEMENT
geog_inhiervar = TRUE
LIMIT geog_hierlist TO ALL
LIMIT geog_hierlist TO 'Sales_Geog'
LIMIT geog TO ALL
LIMIT geog TO 'Canada' 'USA' 'All Country'
geog_inhiervar = FALSE
LIMIT geog COMPLEMENT
geog_inhiervar = TRUE
LIMIT geog TO ALL
LIMIT geog_hierlist TO ALL
"Display the values of the variable
REPORT DOWN geog geog_inhiervar
---GEOG_INHIERVAR----
----GEOG_HIERLIST----
Political_
GEOG Geog Sales_Geog
-------------- ---------- ----------
Boston yes yes
Springfield yes yes
Hartford yes yes
Mansfield yes yes
Montreal yes yes
Walla Walla yes yes
Portland yes yes
Oakland yes yes
San Diego yes yes
MA yes yes
CT yes yes
WA yes yes
CA yes yes
Quebec yes yes
East no yes
West no yes
All Regions no yes
USA yes no
Canada yes no
All Country yes no