MDX Documentation

Perspectives

Perspectives represent a view of a cube where some OLAP entities (dimensions, members, levels...) are hidden.

Overview

Perspectives allow for defining a set of OLAP entities that are hidden to the end users. They represent a 'limited' view of an underlying cube by removing entities such as dimensions, hierarchies, levels, members and measures among others. There are mainly used to offer end users a simplified version of a cube / schema making visible only part of the OLAP entities.

How are they defined?

Perspectives are defined in the 'Advanced' tab of the Designer tab. For end users, they are no different from cubes. In icCube two main groups of perspectives are possible :

  • The default perspective, optional and unique, defines a perspective that will be applied to all available cubes.
  • No default perspectives, they defines a new 'view' that can be accessed as a cube from any front end

Perspectives are easy to define, you'll have to enter a list of OLAP entities defining that you want to hide(-) or show (+). Follow an example of perspective :

OLAP Parent/Child hierarchy

The definition of a perspective can contain MDX functions (e.g. Filter() ) as well as standard OLAP entities. Note however, that it is not possible at this point in time to use functions that access fact values (e.g. TopCount() function ). Follow an example of perspective definition:

     /* hide Product dimension */
     -[Product]
      /* hide Time dimension */
     -[Time]
     /* hide Countries and Politics hierarchy from Geography dimension */
     -[Geography].[Countries]
     -[Geography].[Politics]
     /* hide measure hidden */
     -[Measures].[hidden]
     /* hide all members of [Geo].[city] level that contain an 'a' in his name */
     -Filter( [Geography].[Geo].[City].members, CONTAINS([Geography].[Geo].currentmember.name, 'a'))
     /* add Madrid as a visible city */
     + [Geography].[Geo].[City].[Madrid]

How perspectives impact a model?

It is important to stress that hidden members will have no impact on aggregates values as opposed to security permissions. Therefore hiding a member will not change the value of his parent. Some general rules on how perspectives impact MDX :

  • Hidden entities are not directly available using XMLA or GVI interface (e.g. not visible in Excel Pivot)
  • Hidden entities are not returned by MDX set functions (e.g. members, descendants, children...)
  • Hidden entities are returned if directly entered as text string (e.g. [Geography].[Country].[Spain] is availabe even though hidden)
  • Hidden entities have no impact on facts or measures (e.g. the value of [Europe] will not change if we hide [Spain])
  • Removing members from facts is possible through security (access rights) permissions. They are available in Schema Permission use case (Administration/Roles)

Loading the perspective model and executing a request in the IDE will show the hierarchy without the hidden members. For example, executing the above request will show Paris, even though it is hidden, as is entered as a string, and the list of visible members of the [Geo] hierarchy:

select
  {[Geography].[Geo].[Paris]} + [Geography].[Geo].members  on 0
from [Cube OnlyGeo]
    

OLAP Parent/Child hierarchy

Self contained working schema is available for download here.