Defining named sets

Named sets group either one or multiple dimension members based on certain criteria. Named sets could be either dynamic or static. Static sets are evaluated once you define the set, whereas dynamic sets are evaluated at the time of query execution. In this section, we will first build a static named set of the top three resellers and validate it with queries, and then make the set dynamic to note the difference.

How to do it...

Let's get started. To build a named set of the top three resellers in terms of sales amount:

  1. Right-click on the Top N Count template, and choose Add Template.
  2. Call the named set Leading Resellers, and edit the calculation as follows:
    TOPCOUNT ([Reseller].[Reseller].[all resellers].children, 3, measures.[reseller ...

Get SQL Server Analysis Services 2012 Cube Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.