Defining DeepSee Models
Defining Subject Areas
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

This chapter describes how to define subject areas. It includes the following topics:

Note:
In the current release, you cannot hide relationships in a subject area. To hide, add, or override named sets and calculated members (including calculated measures), use Studio. See Reference Information for Subject Area Classes.”
Also see Defining Compound Cubes in the Advanced DeepSee Modeling Guide.
Introduction to Subject Areas in the Architect
This section describes what the Architect displays when you are viewing a subject area rather than a cube.
  1. Click Open, click Subject Areas, click AsthmaPatients, and then click OK.
    Now the system displays the page similar to what you see for a cube, except that it does not have the Class Viewer on the left:
Model Viewer
The left area is the Model Viewer, and it shows the overrides defined in this subject area. For example:
This subject area does not define any overrides or any listings. (Many subject areas include only a filter.)
Here you can add overrides, select existing overrides for editing, and delete overrides.
You can also define new listings.
Details Area
The right area is the Details Area, and it shows details for the element that is currently selected in Model Viewer (if any), or for the subject area (if nothing is selected).
For example:
Defining a Subject Area
To define a subject area:
  1. In the Architect, click New.
  2. Click Subject Area.
  3. Enter the following information at a minimum:
    The other options are discussed later in this chapter.
    Apart from the class name, you can edit all options after creating the subject area.
  4. Click OK.
  5. Click the subject definition in the Architect to select it. Then edit the Depends On option in the Details Area. For the value, specify the full package and class name of the cube class on which this subject area is based.
    The subject area class should always be compiled after the cube class. The Depends On setting helps control this.
  6. Optionally save the subject area. To do so:
    1. Click Save.
    2. Click OK.
    The system creates the class.
Or manually create the class as described in the appendix Reference Information for Subject Area Classes.”
Filtering a Subject Area
In most cases, you use subject areas to control access to data. In these cases, you specify the filter for the subject area. You can do this in either or both of the following ways:
Note:
The following subsections apply to MDX filters in general, not just to filters of subject areas.
Building a Filter in the Analyzer and Copying It into Your Model
If you are not familiar with MDX, the easiest way to specify a filter expression is as follows:
  1. Create a filter by drag and drop as described in Using the DeepSee Analyzer.
  2. Click the Query Text button .
    The Analyzer displays a dialog box with text like this:
    SELECT FROM [PATIENTS] WHERE [AGED].[H1].[AGE GROUP].&[0 TO 29]
  3. Ignore all text before WHERE, which might be considerably more complicated depending on what you have done in the Analyzer. Copy all the text that follows WHERE into the system clipboard or other temporary location.
  4. Paste the copied text into the Filter option for the subject area.
    For example:
    [AGED].[H1].[AGE GROUP].&[0 TO 29]
Writing Filter Expressions
This section discusses common forms of filter expressions.
Also the DeepSee MDX Reference.
Simple Filter
A simple filter refers to a single member:
[AGED].[H1].[AGE GROUP].&[0 TO 29]
This filter accesses only patients in the age range 0 to 29.
The preceding expression is an MDX member expression. Note the following details:
Also note the following possible timesaving variations:
Filter with Set of Members
In other cases, you might need multiple members. For example:
{[aged].[h1].[age group].[0 to 29],[aged].[h1].[age group].[30 to 59]}
The subject area is filtered to include all records of the fact table that belong to any of the elements of the set. This subject area sees patients in the age group 0 to 29 and patients in the age group 30 to 59 — that is, it sees all patients under 60 years of age.
Important:
Notice that the list is enclosed by braces; this indicates that the list is an MDX set. A set is a union of elements.
Filter with a Tuple
In some cases, you might need to find only records that meet multiple simultaneous criteria. In this case, you use a tuple expression. For example:
([aged].[h1].[age group].[60+],[diagd].[h1].[diagnoses].[diabetes])
This subject area sees patients who are 60 or older and who also have diabetes.
Important:
Notice that the list is enclosed by parentheses; this indicates that the list is an MDX tuple. A tuple is an intersection of elements.
Filter with Multiple Tuples
You can list multiple tuple expressions within a set. For example:
{([aged].[h1].[age group].[60+],[diagd].[h1].[diagnoses].[diabetes]),
([colord.].[h1].[color].[red],[allergd].[h1].[allergy].[soy])}
This subject area sees all patients who meet at least one of the following criteria:
Specifying Other Subject Area Options
In addition to the previously described options, you can specify the following additional options for a subject area:
Adding Items to a Subject Area
To add an override or a listing to a subject area, use the following general procedure:
  1. Click Add.
    The system displays a dialog box on which you can choose an item from the cube:
    If the subject area already defines an override for an item, this dialog box displays a check mark for that item.
  2. Click Measure, Dimension, or Listing.
    With Measure, you can override any measure defined in the cube.
    With Dimension, you can override any dimension, hierarchy, or level defined in the cube.
    With Listing, you can override any listing defined in the cube. You can also add listings.
  3. Click the item or items to override and then click OK.
    The system adds the items, displays them in the Model Viewer, and shows their details in the Details Area.
  4. Edit the details in the Details Area.
Defining an Override for a Measure
To define an override for one or more measures:
  1. Optionally click a measure name in the Model Viewer, to indicate where the new override is to be added.
    If you do so, the new override is added before the measure you clicked.
  2. Click Add.
  3. Click Measure.
  4. Click the measure or measures to override and then click OK.
    The system adds the measures and displays them in the Model Viewer.
  5. To define the override for a measure, click the measure name in Model Viewer and edit the following options in the Details Area. These are all optional.
Note:
You cannot define overrides for calculated measures this way. A calculated measure is actually a calculated member; to define an override for it, you must use Studio.
Defining an Override for a Dimension, Hierarchy, or Level
To define an override for one or more dimensions, hierarchies, or levels:
  1. Click Add.
  2. Click Dimension.
    The system displays the dimensions, hierarchies, and levels of the cube as follows:
  3. Click the item or items to override and then click OK.
    The system adds the items and displays them in the Model Viewer.
    You can click any combination of dimensions, hierarchies, and levels. If you click a hierarchy but not its containing dimension, the system always adds the dimension as well (because the dimension is part of the hierarchy definition). Similarly, if you click a level but not its containing hierarchy or dimension, the system always adds the hierarchy and dimension as well.
  4. To define the override for an item, click the item name in Model Viewer and edit the following options in the Details Area. These are all optional.
Redefining a Listing or Adding a New Listing
To redefine a listing or define a new listing for the subject area:
  1. Optionally click a listing name in the Model Viewer, to indicate where the new override is to be added.
    If you do so, the new override is added before the listing you clicked.
  2. Click Add.
  3. Click Listing.
    The system displays the listings of the cube and of the subject area as follows:
  4. Optionally click the listing or listings to redefine.
  5. Optionally type the name of a new listing in the box at the bottom.
  6. Click OK.
    The system adds the listings (with no definitions) and displays them in the Model Viewer.
  7. To define a listing, click the listing name in Model Viewer and edit the options in the Details Area.
    For details, see the chapter Defining Listings.”
Compiling a Subject Area
To compile a subject area class in the Architect:
  1. Click Compile.
    The system displays a dialog box.
  2. Click Compile.
    DeepSee starts to compile the class and displays progress as it does so.
  3. Click OK.
Or open the subject area class in Studio and compile it in the same way that you compile other classes.
Tip:
Before you compile a subject area class, you must compile the cube class on which it depends. It is useful, but not required, to use Studio to edit the subject area class and add the DependsOn keyword to force the classes to be compiled in the correct order. See Requirements for a Subject Area Class in the appendix Reference Information for Subject Area Classes.”