MicroStrategy ONE

Adding and modifying attributes

Just as you can add more facts to your project once you have created it, you can also create and add attributes as they become necessary. As a company evolves, so does its reporting requirements; these requirements can lead to changes to the data warehouse as well as to the schema within its MicroStrategy projects.

For example, a health care company, with offices only in the United States, decides to extend its operations into Europe and Asia. Before the shift overseas, the company does not include lookup tables with information about different countries in its data warehouse.

However, when the company opens its offices in Europe and Asia, it must add lookup tables that contain data about its new offices to its warehouse. It must then add these tables to its MicroStrategy project, and create the appropriate attributes so report users can analyze business data for their appropriate country.

You can use various techniques and interfaces to create and modify attributes for a project:

  • The Attribute Creation Wizard allows you to:
    • Create simple attributes
    • Create multiple attributes quickly
    • Add a large number of attributes during project creation

      The Attribute Creation Wizard works well for building a large number of attributes initially, but you cannot use it to modify existing attributes or to define more advanced attributes. In general, you only use the Attribute Creation Wizard as part of the initial project creation to create most of the attributes for the project. For steps to use the Attribute Creation Wizard, see Simultaneously creating multiple attributes and Adding attributes with the Attribute Creation Wizard.

  • The Attribute Editor allows you to:
    • Create simple and advanced attributes
    • Edit existing attributes and configure additional schema-level settings

      You can use the Attribute Editor to edit existing attributes and create additional attribute forms, map heterogeneous column names, define advanced expressions, configure additional settings, and so on. The Attribute Editor allows you to modify one attribute at a time, which can be helpful when only a few facts in a project need to be modified. For steps to use the Attribute Editor, see Adding attributes with the Attribute Editor and Modifying attributes.

  • Architect allows you to:
    • Create simple attributes
    • Create multiple attributes quickly
    • Add a large number of attributes during project creation
    • Create simple and advanced attributes
    • Edit existing attributes and configure additional schema-level settings

With Architect, you can support all of the simple and advanced attribute features that are available in the Attribute Editor. Rather than focusing on one attribute at a time with the Attribute Editor, you can use Architect to create and modify multiple attributes for a project at once. For information on how to use Architect, see Adding and modifying simple and advanced attributes using Architect.

Adding attributes with the Attribute Creation Wizard

Although the Attribute Creation Wizard is primarily used to create most of a project's attributes during initial project creation, you may still find it useful if you need to create multiple attributes from remaining lookup columns in your warehouse.

Follow the steps below to use the Attribute Creation Wizard to create simple attributes in bulk.

To create simple attributes in bulk using the Attribute Creation Wizard

  1. In MicroStrategy Developer, log in to the project source that contains your project and expand your project.

    You must use a login that has Architect privileges. See the List of Privileges chapter in the System Administration Helpfor more information.

  1. From the Folder List, select the project to which to add new attributes.
  2. From the Schema menu, choose Attribute Creation Wizard. The Attribute Creation Wizard opens.
  3. To create attributes with the Attribute Creation Wizard, follow the steps outlined in Simultaneously creating multiple attributes.

Adding attributes with the Attribute Editor

The Attribute Editor is used to add advanced features such as attribute forms to attributes that already exist. You can also use it to add new attributes to your project.

To create an attribute using the Attribute Editor

  1. In MicroStrategy Developer, log in to the project source that contains your project and expand your project.
  2. From the File menu, select New, and then Attribute. The Attribute Editor opens, with the Create New Form Expression dialog box displayed on top of it.
  3. From the Source table drop-down list, select a table which contains the columns of data for the attribute. Its columns are listed in the Available Columns pane.
  4. Create a form expression for the ID form of the new attribute being created.
    • To create a simple attribute form expression (Attribute form expressions), drag a column from the Available columns pane to the Form expression pane.
    • To create a more advanced attribute form expression, use a combination of any of the following techniques:
      • Enter constants in double quotes.
      • Click f(x) in the Form expression toolbar to create a function using the Insert Function Wizard.
      • Click any operator in the Form expression toolbar to insert it into the expression.
  1. Click Validate to ensure that your expression is valid.
  2. Under Mapping method, select Automatic or Manual:
    • Automatic mapping means that all of the tables in the project with the columns used in the attribute form expression are selected as possible source tables for the attribute form. You can then clear any tables mapped automatically or select other tables.
    • Manual mapping means that all of the tables in the project with the columns used in the attribute form expression are located but are not selected as possible source tables for the attribute form. You can then select which of those tables are used as source tables for the attribute form.
  3. The mapping method defaults to Automatic for the first attribute or attribute form expression you create. The system maps the expression to each of the source tables. For subsequent attributes, the default is Manual.

    An expression that uses only a constant value cannot use the automatic mapping method.

    To use an attribute for meaningful analysis, you must verify that it includes a column from a fact table in its definition, or is related to an attribute that does. For example, to use the Month attribute for analysis, you must create a relationship to the Day attribute, which must include the DAY column from the fact table in its definition. To create relationships between attributes, see Attribute relationships.

  1. Click OK. The Create New Attribute Form dialog box opens, from which you can create attribute forms for the attribute (Column data descriptions and identifiers: Attribute forms).
  2. From the Source tables pane, select a table and click Set as Lookup to set the lookup table for the attribute. A lookup table acts as the main table which holds the information for an attribute. If you chose manual mapping, select the check boxes of the tables to map to the attribute form.
  3. In the Form general information area, type a name and description in the associated fields for the attribute form.
  4. In the Category used drop-down list, do one of the following:
    • Select a form category from the drop-down list. For a description of form categories, see Displaying forms: Attribute form properties.
    • Click Modify to create a new form category.

      Using a column with a non-numeric data type as an ID column of an attribute can result in SQL generation issues. Therefore, if you select a column with a non-numeric data type and set it as an ID column, a warning message appears by default when you click OK in the Create New Attribute Form dialog box.

  1. In the Form format area, select a display type and a default sorting option from the associated drop-down lists.

    Custom groups are sorted by the Default sort of the form that appears first in the Report display forms. For more information on custom groups, refer to the Advanced Reporting Help.

  2. If the attribute form should be capable of displaying information in multiple languages, select the Supports multiple languages check box. For information on supporting the display of data in multiple languages, see Supporting data internationalization for attribute elements.
  3. Click OK. The Attribute Editor opens.
  4. From the File menu, select Save As. The Save dialog box opens.
  5. Navigate to the folder in which to save the attribute. Enter a name for the attribute. Click Save.
  6. From the Schema menu, select Update Schema to update the project schema. This ensures that your project is updated to recognize the new attribute definition.

Modifying attributes

After creating an attribute, you can modify the attribute at any time using the Attribute Editor. You cannot use the Attribute Creation Wizard to modify attributes.

To modify an existing attribute

  1. In MicroStrategy Developer, open the folder that contains the attribute to modify.
  2. Double-click the attribute to edit. 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 Attribute Editor in edit mode so that you can make changes to the attribute. The Attribute Editor opens.

    If you are only given the option of opening the Attribute Editor in read only mode, this means another user is modifying the project's schema. You cannot open the Attribute Editor in 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.

    You can then modify all the options available when creating and attribute in the Attribute Editor, which is described in the previous procedure To create an attribute using the Attribute Editor.

You can learn how to create more advanced attributes in the various sections in this chapter.

Adding and modifying simple and advanced attributes using Architect

Architect can be used to create and modify simple and advanced attributes in a visually integrated environment. Architect allows you to view the tables, attributes, attribute relationships, facts, user hierarchies, and other project objects together as you design your project.

With Architect, you can support all of the simple and advanced attribute features that are available in the Attribute Editor. Rather than focusing on one attribute at a time with the Attribute Editor, you can use Architect to create and modify multiple attributes for a project at one time. Review the chapters and sections listed below for information on Architect and steps to create and modify attributes using Architect: