Defining named sets
A named set allows you to create an expression that defines a set of members. When you run a report containing a named set, the corresponding expression is evaluated and the resulting set of members is rendered in the report.
A named set
is defined by a dimensional set expression that evaluates to a set
of members from a single hierarchy. For example, topcount(Customers,
5, Sales)
.
After you publish dynamic cubes, the named sets are available as data items in the Named Sets folder within the metadata tree in IBM® Cognos® studios.
IBM Cognos Cube Designer validates the syntax of named set expressions. After a cube is started, the dynamic cube server validates the semantics of the expressions by using the cube default member context and the security of the access account. Any expression that is not successfully validated while the cube is starting is removed from the cube and is not available in the studios. If an expression is removed, an error message is recorded in a cognos_analytics_location/logs/XQE log file.
A named set is dynamic. It is evaluated at report execution time using the query context and the security of the currently authenticated user. For example, a named set nested under a set of years is evaluated independently for each year.
You can use named sets within other named set expressions or within a calculated member or measure expression. Named sets can include parameters and macros.
If you are using member or attribute security, the security is also applied to the named set members.
Named sets from source cubes are not inherited in a virtual cube. If you want to use the named sets in a virtual cube, you must define them for the virtual cube.
You create named sets at the cube level, for dynamic cubes and virtual cubes. Named sets are stored within the Named Sets folder. You can organize named sets by creating sub-folders within the Named Sets folder.
Procedure
Use the following steps to create a new folder in the Named Sets folder and to define a named set expression.