To use Cognos product documentation, you must enable JavaScript in your browser.

Dimensions

Information about dimensions based on relational metadata appears in a different topic .

A dimension is a broad grouping of data about a major aspect of a business, such as products, dates, or markets.

The types of dimensions that you can work with in Framework Manager are regular dimensions and measure dimensions. In SAP BW, measure dimensions are called key figures.

For example, in a project for sales analysis, you include these dimensions:

Name

Type

Description

Time

Regular dimension

Dates of sales organized into years, quarters, months, weeks, and days when sales were made

Region

Regular dimension

Locations of sales grouped into sales regions, countries, and cities

Product

Regular dimension

Product details organized by product type, brand, model, color, and packaging

Customer

Regular dimension

Customer information

Sales

Key Figures dimension

Purchase details such as units sold, revenue, and profit

Modify a Regular Dimension

Information about creating a regular dimension for relational metadata appears in a different topic .

A regular dimension contains descriptive and business key information and organizes the information in a hierarchy, from the highest level of granularity to the lowest. It usually has multiple levels and each level requires a key and a caption. If you do not have a single key for your level, it is recommended that you create one in a calculation.

Model regular dimensions are based on data source or model query subjects that are already defined in the model. You must define a business key and a string type caption for each level. When you verify the model, the absence of business keys and caption information is detected. Instead of joining model regular dimensions to measure dimensions, create joins on the underlying query subjects and create a scope relationship between the regular dimension and the measure dimension.

When dimensions are based on SAP BW metadata, you cannot edit the underlying query.

Steps
  1. Click the regular dimension you want to modify.

  2. From the Actions menu, click Edit Definition.

  3. Choose the action that you want:

  4. Click OK.

Hierarchies for a Regular Dimension

Information about hierarchies for relational metadata appears in a different topic .

A hierarchy is an ordered list of levels or a collection of items. Each query item in a hierarchy must have a unique name.

You can specify multiple hierarchies on regular dimensions in Framework Manager. Multiple hierarchies for a regular dimension behave as views of the same query. The first hierarchy is the primary or default hierarchy.

You can use only one hierarchy at a time in a query. For example, you cannot use one hierarchy in the rows of a crosstab report and another hierarchy from the same dimension in the columns. If you need both hierarchies in the same report, you must create two dimensions, one for each hierarchy. For more information, see Modeling Dimensions with Multiple Hierarchies

For example, sales staff can be viewed by manager or by geography and can be modeled as a single dimension with two hierarchies.

Balanced Hierarchy

Each path in a balanced hierarchy descends to the same depth.

For example, in the following diagram, the highest level is Product Line. Level 2 is Product Type. Level 3 is Products.

In SAP BW, all leaf nodes of a hierarchy are values of the characteristic, but each path does not have to descend to the lowest level of the hierarchy.

For information about optimizing performance for balanced hierarchies, see .

Unbalanced Hierarchy

The branches in an unbalanced hierarchy descend to different levels.

For example, in the following diagram, the highest level in an organization is the CEO. Level 2 is the vice-presidents and the CEO’s executive assistant. The executive assistant does not have subordinates although the vice-presidents do.

An unbalanced hierarchy can also be ragged. In a ragged-unbalanced hierarchy, there are gaps in the levels and the levels descend to different depths.

In SAP BW, this occurs only when there are "not assigned" (or "#") nodes in a presentation hierarchy. However, the presence of such a node does not guarantee that the hierarchy is unbalanced. You must investigate the layout of a hierarchy to be certain.

For information about optimizing performance for unbalanced hierarchies, see .

Ragged Hierarchy

At least one path in the hierarchy skips at least one level.

For example, the highest level could be Continent. Level 2 could be Country. Level 3 could be City. Level 4 could be Street. A country such as Vatican City contains only streets, no cities.

In SAP BW, this occurs only when there are not assigned or # nodes in a presentation hierarchy. However, the presence of such a node does not guarantee that the hierarchy is ragged. You must investigate the layout of a hierarchy to be certain.

For information about optimizing performance for ragged hierarchies, see .

Network Hierarchy

A member of the hierarchy has more than one parent.

For example, an employee may report through different organizations and have multiple managers. For SAP BW, this employee will be included in the count of all employees only once, and not be included in every organization.

In addition to hierarchies in dimensions, there are hierarchies in SAP BW metadata .

Levels for a Regular Dimension

A level is a collection of attributes, typically of a common granularity. Each level needs an item that is defined as a key and another item that is defined as a caption. For SAP BW data sources, levels contain members.

The first level of the hierarchy is automatically defined as the All level. It contains a single root member, which represents the top level of the hierarchy. For example, the All level for the Time dimension is named Time (All). You cannot delete or move the All level. You can change its name, description, and screen tip.

If you do not specify the levels of the hierarchy correctly, incorrect aggregation could occur.

Member Unique Names

The member unique name (MUN) is how the member is found in the data source, much like using business keys to find records in a table.

The member unique name is used in the expression for a member data item that is used in a report, a reference to members in filters and expressions, and used in drill-through between OLAP data sources. The member keys in the MUN for the different OLAP data sources must match.

Roles

Information about roles for relational metadata appears in a different topic .

Roles define what appears in the member tree in the Cognos 8 studios. Use roles to organize and manage metadata and to determine how to present data to your users.

You can also create expressions that refer to roles instead of query items. You must use the roleValue function to refer to a particular role. For example, you want to query against a specific role in a hierarchy but the query item playing that role is different at each level of the hierarchy. A single query can span the different query items at each level. You can also use the roleValue function when you know the role but not the underlying query item.

You can assign multiple roles to one query item, but the same role cannot be assigned to different query items in the same level.

Default roles are pre-defined for all parent-child hierarchies and for all levels in level-based hierarchies. Most of these roles are not visible in the Cognos 8 studios.

The roles that are reserved by Cognos 8 start with an underscore. The name for a custom role cannot start with an underscore.

Default Roles

The default roles include the following:

If a query item uses a default role, you cannot change its role. This applies to SAP BW metadata only.

Custom Roles

You can create custom roles. Each role that you create must have a unique name. The roles that are reserved by Cognos 8 start with an underscore. The name for a custom role cannot start with an underscore. You can translate the custom roles in the model.

User-defined properties in OLAP data sources are assigned roles with the same name as the query item.

Specify Roles

Roles define what appears in the member tree in the Cognos 8 studios. Use roles to organize and manage metadata and to determine how to present data to your users.

Steps
  1. Click the dimension whose roles you want to define.

  2. From the Actions menu, click Edit Definition.

  3. Click the Dimension tab.

  4. In the Hierarchies box, click the level you want.

  5. In the Select a level in the hierarchy control to see the query items box, click a query item.

  6. Under Role, click the ellipsis (...) button.

  7. Click the Custom Roles tab, and click Add.

  8. Click Close.

  9. Click OK.

You can also use the Dimension Map tab to define roles. Click Attributes, right-click the query item, and click Edit Roles.

Modify a Key Figures Dimension

Information about creating a measure dimension for relational metadata appears in a different topic .

A key figures dimension is a collection of facts such as Quantity Sold or Price. Key figures are related to each other through the regular dimensions. When used in a report or analysis, the key figures dimension shows the value of the query item such as a name or number, or shows null, zero, or invalid. To create reports that fully compare and contrast functional areas, you may need to use more than one key figures dimension in a report.

You can add value by embedding calculations based on existing business rules, such as Profit Margin.

You can also modify the properties for multiple dimensions at the same time .

You cannot define hierarchies or levels for a key figures dimension.

When dimensions are based on SAP BW metadata, you cannot edit the underlying query. However, you can add calculations and filters.

Steps
  1. Click the key figures dimension you want to modify.

  2. From the Actions menu, click Edit Definition.

  3. Choose the action that you want:

  4. Click OK.

Conform SAP BW Dimensions

When you import multiple SAP BW Queries or InfoCubes, there can be two or more hierarchies that contain the same information.

You can conform these hierarchies in Framework Manager to create one dimension and one or more shortcuts. These hierarchies must have the same levels and properties. However, the order of the properties can be different. By conforming dimensions, your users can create reports that use multiple cubes without using an SAP BW MultiProvider.

A conformed dimension is represented by a dimension with one or more shortcuts to it. The dimension contains a list of data sources in which the dimension exists. If you want to retrieve data from a specific data source, ensure that you import the dimension from this data source before all others.

The dotted line in the diagram indicates a shortcut.

For example, a project contains three SAP BW Queries. One SAP BW Query contains basic information with dimensions and key figures, one contains the same information with variables applied, and one contains the same information with currency conversions applied. The common dimensions can be conformed allowing the modeler to maintain one set of common dimensions rather than three sets. To simplify your model, create a business view that uses one set of conformed dimensions, and create individual Key Figure dimensions to reflect the three different SAP BW Queries: Key Figures, Key Figures with Variables, and Key Figures with Currency Conversion.

When conforming dimensions, consider the scope of object-based security .

Note that you cannot conform time or date dimensions. This is because values in the dimensions are often not the same across cubes, and this can produce errors and invalid reports.

Steps
  1. Select one or more dimensions that you want to conform.

  2. From the Tools menu, click Generate Conformed Dimensions.

    The Generate Conformed Dimensions wizard appears, listing all dimensionally aware SAP BW dimensions that exist in the model.

  3. Select the appropriate areas containing the dimension that you want to conform with, or select the actual dimension.

    If you want queries based on these dimensions to retrieve data from a specific data source, select the dimension that references the preferred data source.

  4. Click Next.

  5. Identify the dimensions that you want to include in the conformed dimension, and click Next.

  6. Click Finish.

Remove a Conformed SAP BW Dimension

When you import SAP BW metadata into your project, you can select an option for Framework Manager to automatically create conformed dimensions for any two or more hierarchies that have a matching structure. If there are dimensions that you do not want conformed, you can remove them after the initial import.

Steps
  1. Delete all instances of the dimension from the model.

    Tip: The easiest way to do this is to delete the one instance of the dimension that is not a shortcut. This removes all the shortcuts from the project.

  2. From each relevant data source, re-import the dimensions that were deleted, ensuring that the generate conformed dimensions option is not selected.

  3. Ensure that dimensions appear in the project as expected. No shortcuts should be used for these dimensions.

View Related Objects

Information about viewing related objects for relational metadata appears in a different topic .

You can explore a visual representation of the objects that are connected to the query subject or dimension that you select in the Project Viewer. The Context Explorer shows the objects that the selected object is connected to. You can also select a connected object and see its references.

You can hide an object in the Context Explorer. You can also change the layout, fit all objects in the Context Explorer, and zoom in and out.

You can also use the Dimension Map tab to explore dimensions.

Steps
  1. Select one or more objects that you want to explore.

  2. From the Tools menu, click Launch Context Explorer.

  3. To see the connected objects, click one or more objects and click the appropriate button.

    Goal

    Button

    View the objects that are related to the selected object.

     

    View the immediate references for the objects.

     

    View all references for the objects.

     

  4. If you want to see details about an object, such as its relationships and query items, right-click the object, click Diagram Settings, and then select the details you want.

Test a Dimension or Other Object

Information about testing relational metadata appears in a different topic .

You can test a dimension, a level, a hierarchy, query items, or model query subject.

Testing a regular dimension returns the attributes associated with the first hierarchy encountered in the dimension.

You can see the results that an object returns by testing it. You can test when creating an object or later on. The objects you can test are dimensions, query subjects, query sets, hierarchies, levels, calculations, and query items.

You can view the data that will appear in a specific report before publishing a package by selecting and testing the objects that will appear in the report. This makes it easier to debug a model and to verify that the model meets the reporting requirements because you do not need to create and publish packages first.

When you test an object, Framework Manager returns sample data. Formatting is not applied to the sample data. If you must test formatting, you must publish the package and view the objects in the Cognos 8 studios.

You may see different results depending on what you test. For example, if you use the expression editor to test a calculation that is embedded in a query subject, Framework Manager tests only the expression, not the item, so the aggregation setting for the query item is not applied to the test. Testing the entire query subject, which includes the calculation, gives a different result because the aggregation setting is applied. For example, if the aggregation setting is summarize, you can see a smaller number of rows in the test.

If you test a child segment of a segmented model, you may see an error if an object you are testing refers to an object in another child segment and the referenced object is not available to the project you are in. We recommend that you check that the parent model contains all the objects and that this error message does not appear when you test the parent model.

Governor settings may affect the testing results. For more information, see Set Governors.

You can change existing test settings to customize the results that the test shows. For example, in addition to other settings, you can control the number of rows returned.

Steps When Creating or Modifying the Object
  1. Select the object you want to test.

  2. From the Actions menu, click Edit Definition, and click the Test or Query Information tab.

    The Test Results box is initially empty until you run the query.

    Any result sets that contain binary large objects are shown as [blob].

  3. To run the query and bring back all the test results, click Test Sample.

  4. If you are testing an expression and you want to apply the Regular Aggregate property of the query item or measure that is referenced in the expression, select the Auto Sum check box.

    If you clear this check box, a row is returned for each row in the result set of the query.

  5. If you want to obtain more information about the query results, click the Query Information tab.

  6. Click OK.

Steps to View the Data That Will Appear in a Specific Report
  1. Select the objects that will appear in the report.

  2. From the Tools menu, click Test.

    A message appears, telling you if the test was successful or if problems were found.

  3. To view details about any problem that is found, click the Query Information tab.

    If you do not see the results of the query in the test window, the data from your data source may exceed the value of the Runtime Limits governor. The query stops at the specified limit, but the test result window does not contain any data. Tip: Set the Runtime Limits governor to zero.

Change the Test Settings

You can customize the tests by changing the test settings.

Steps
  1. Select the object that you want.

  2. From the Actions menu, click Edit Definition and then click the Test tab or the Query Information tab.

  3. Click Options and then click the Test Settings tab.

  4. Choose the options that you want.

    Goal

    Action

    Persistence

    Retrieve all data and show a specified number of rows

    Select the Restrict the maximum number of rows to be returned check box and type the required number of rows.

    This setting does not improve performance for retrieving data when testing dimensions, query subjects, and query sets.

    This setting applies to all dimensions, query subjects, and query sets in the model.

    This setting is saved and used in your next session with any model.

    Specify the level of detail

    Drag the Level of Information shown in Results Information slider to the location that represents the amount of detail you require.

    This setting is saved and used in your next session with this model.

    Temporarily override session parameters

    In the Session Parameters box, click Set.

    The Session Parameters dialog box appears.

    The override values are not saved with the model. This setting is for your current session only.

    Apply relevant design mode filters

    Select the Apply all relevant design mode filters when testing check box.

    This applies all relevant filters whose usage is set to design mode in another dimension, query subject, or query set.

    This setting is saved and used in your next session with any model.

    Apply a security filter

    In the Security Filters box, click Edit.

    This setting is saved and used in your next session with this model.

    Change the prompt values

    In The Current Prompt Values box, click Prompts.

    The Model Prompts Manager dialog box appears, which shows all prompts, and their values, that are in the model.

    The prompt values are not saved with the model.

    This setting is for your current session only.

  5. Click OK two times.

You may be interested in the following related topics:

Working with Model Query Subjects

Information about query subjects based on relational metadata appears in a different topic .

A query subject is a set of query items that have an inherent relationship.

You use Framework Manager to modify query subjects to optimize and customize the data that they retrieve. For example, you can add filters or calculations. When you change the definition of a query subject, Framework Manager regenerates the associated query items, ensuring that any changes to query subject properties are reflected in all query items for that query subject.

For SAP BW metadata, you can work with model query subjects in Framework Manager.

Model query subjects are not generated directly from a data source but are based on query items in other query subjects or dimensions, including other model query subjects. By using model query subjects, you can create a more abstract, business-oriented view of a data source.

If you create a model query subject containing multiple dimensions, you may encounter problems when using the model query subject in conjunction with other query subjects or dimensions. Ensure that the items in a model query subject do not contravene the logic of the model, for example, the product item inserted between the country and city items. Test the model query subject in a report; if grouping works, the model query subject is valid.

Create a Model Query Subject

Information about query subjects based on relational metadata appears in a different topic .

For SAP BW metadata, you can create only a model query subject.

You can also create a new model query subject by merging existing query subjects and query items .

Steps
  1. Select the namespace folder and, from the Actions menu, click Create, Query Subject.

  2. In the Name box, type a name for the new query subject.

  3. Click the Model Query Subjects and Query Items button, and click OK.

    The Query Subject Definition dialog box appears.

  4. Click the Query Subject Definition tab.

  5. From the Available Model Objects box, drag the items for this model query subject to the Query Items and Calculations box.

    You can change the order of items and calculations. However, if the query subject contains a query item folder, you can change the order only in the Project Viewer.

  6. To embed calculations in the model query subject, click Add and define the calculation.

  7. To embed filters in the model query subject, click the Filters tab.

  8. To test the model query subject, click the Test tab.

  9. Click OK.

  10. To use a star layout in the Diagram view, from the Diagram menu, click Auto Layout Diagram, and then select Star.

Tip: To control the model area that is visible in the diagram, click and hold the overview button in the bottom right corner and drag the pointer over the diagram .

You may be interested in the following related topics:

Create a Model Query Subject Based on Existing Objects

Information about model query subjects based on relational metadata appears in a different topic .

You can select existing model objects and merge them into a new model query subject. This means that you can reuse existing metadata to quickly create query subjects.

The objects that you can merge include

You can merge any number of the same type of objects into a new query in a single operation. The merge always creates a new model query subject.

The new query subject contains any filters that exist in the original query subject.

Notes:
Steps
  1. Ctrl+click the objects that you want to merge into a single query subject.

  2. From the Actions menu, click Merge in New Query Subject.

Validate a Model Query Subject

Information about validating relational query subjects appears in a different topic .

You can validate the definition of the query subject without having to open the Query Subject Definition dialog box. This is useful to do when

The Evaluate Object command completes an exhaustive check of all query subjects and ensures that they can run.

When Framework Manager evaluates a query subject, a request is sent to the SAP BW data source. Physical attributes, such as data type, are then updated as needed for the query subject.

You can also synchronize the entire project .

Steps
  1. Select the query subject you want to evaluate.

  2. From the Tools menu, click Evaluate Object.

If you changed the Regular Aggregate property to unsupported, the property is reset when you evaluate the query subject. If the property is set to any other value, the property is not changed.