Filtering attributes in a hierarchy

Before reading this section, refer to the Filters chapter in the Advanced Reporting Guideto understand what filters are and how to create them in MicroStrategy.

You can add filters to a hierarchy to control how data is retrieved and displayed. With a filter you can choose exactly which attribute elements to display in a hierarchy. For example, you can filter a hierarchy so that data for only one quarter is displayed, or data for only a few days of one quarter. Filters make data retrieval faster by only allowing specific data to be displayed.

You cannot use a prompt-based filter to filter a hierarchy.

Each attribute in the hierarchy can have multiple filters applied to it. When filtering attributes in a hierarchy, you are limiting the elements of the data returned when you browse the Data Explorer. Creating a limited hierarchy reduces the number of elements displayed at one time. Filters, however, limit the elements a user is allowed to see and therefore, perform a type of security.

Filters increase efficiency when retrieving data because you can limit user access to parts of a hierarchy when you apply filters to attributes. The filters allow the Data Explorer to display only the criteria you select, and the user is unable to see additional data in the hierarchy.

For example, you want to view only those customers who are younger than 30 years old. First, create a filter on Customer Age less than 30. In the Hierarchy Editor, add the filter to the Customer attribute. Update the project schema, and view the Customer hierarchy in the Data Explorer. Only those customers younger than 30 years old are displayed.

When adding filters to an attribute in a hierarchy, you need to make sure that each filter is relevant to the attribute’s information. MicroStrategy does not validate that the associated filter makes sense on that attribute.

Prerequisites

A filter has been created.
A hierarchy has been created.

To apply a filter to an attribute in a hierarchy

1 In MicroStrategy Developer, open a hierarchy using either the Hierarchy Editor or Architect, as described below:
Locate a hierarchy in the Folder List, right-click the hierarchy, and select Edit. The Hierarchy Editor opens.
From the Schema menu, select Architect. MicroStrategy Architect opens.

From the Hierarchy View, in the Hierarchies drop-down list, select a hierarchy.

If a message is displayed asking if you want to use read only mode or edit mode, select Edit and click OK to open the schema editor in edit mode so that you can make changes to the hierarchy.

If you are only given the option of using read only mode, this means another user is modifying the project’s schema. You cannot use edit mode until the other user is finished with their changes and the schema is unlocked.
For information on how you can use read only mode and edit mode for various schema editors, see Using read only or edit mode for schema editors.
2 Right-click the attribute to filter and select Define Attribute Filters.
3 If a tip about filtering opens, click OK. The Select Objects dialog box opens.
4 In the Available objects pane, select the filters to apply and click > to add them to the Selected objects pane.
5 Click OK to close the Select Objects dialog box. The attribute to which you applied the filter appears in the hierarchy with a filter icon.
6 In the Hierarchy Editor or Architect, click Save and Close to save your changes and return to Developer.