1. Named Set Scope and Context
When evaluating a query, the slice is evaluated first, and then the named set, which means that all computations that the slice uses to evaluate the named set constitute the context.
Second, the regular use of named sets
The two most common uses of named sets are to improve query performance and to organize logical relationships in complex sets
Example: Querying cities in the flat-screen TV category where the average November sales were 5% higher than October
WITH
member[Measures].[AVG sale]AS'sum([Measures].[sales])/30'SET[Cities]AS'Order (Filter([Customer].[City].Members,[Measures].[avg sale] > 1.05 * ([Measures].[avg sale],[Time].[2015].[10])),Measures].[AVG sale],BDESC)'
select
{
[Measures].[AVG sale],
} on columns,
{
[Cities]
} on rows
FROM [Sales]
where ([Product].[Category].[Third-level category],[Time].[2015].[10])