Database Reference
In-Depth Information
Defining named sets
Named sets group either one or multiple dimension members based on certain criter-
ia. 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 sales amount])
3. Change the Type property to Static , and save the changes.
4. To verify the named set, switch to SSMS, and execute the following query (the
results are shown immediately after the query):
SELECT measures.[reseller sales amount]
ON 0,
[leading resellers] ON 1
FROM [Adventure Works]
Reseller Sales Amount
Metropolitan Equipment
$644,059.49
Search WWH ::




Custom Search