Creating named sets

A named set is a set of hierarchy members or a set expression that is created for reuse. Named sets are created by combining cube data, arithmetic operators, numbers, and functions. For example, you can create a named set called Top Ten Factories that contains the ten members of the Factories hierarchy that have the highest values for the Production measure. Top Ten Factories can then be used throughout the report.

Named sets are different from calculated members; where calculated members produce a single member, named sets generate a collection of members.

Creating a new named set

A new named set can be created by clicking the button on the editor toolbar of the hierarchy you want to create the set in.

This will display the named set dialog as shown below.

 

 

In the top part, you can provide values for the name and description fields. In the name field, you must provide the name of the named set.

Note that the set name must be unique within the hierarchy it belongs to.

Below is the area where you can enter the MDX formula for the set.

To help with the formula creation, you can use the tools on the left hand side.

 

Testing

You can check if the formula you have entered is syntactically valid and produces valid results by pressing the Test button. This will execute a query in the background using the formula specified. Upon completion, you will be notified if the query was successful or not, and the reason for failure, if any.

Editing an existing named set

You can edit a previously created set by selecting the set, right-clicking and selecting Properties item from the menu. This will bring up the named set editor as displayed above.

If you just want to rename the member, you can press F2 or select Rename from the context menu.

 

Deleting a named set

To remove a set from the hierarchy, select the set and press the Delete button, or right-click and select Delete.

If the set has been selected as part of the current query, it will be removed from the query and the query will be re-executed.