Defining query level calculations and named sets
In addition to listing the existing dimension hierarchy members, MDX queries often include calculations. If your application repeatedly references the same calculation, you should define such calculations in the MDX script. However, ad hoc queries will often necessitate calculations that are not defined within the cube. Query-level calculations are defined using the WITH MEMBER
clause. Calculations included within the Measures
dimension are often called calculated measures, whereas within other dimensions they're referred to as calculated members. A named set allows grouping of one or more dimension members to perform additional calculations specific to the group or to more elegantly reference the collection. Use the WITH SET
keywords to define the named set. Each query must specify the WITH
keyword only once; if a query defines a calculated measure using the WITH MEMBER
construct, you don't need to repeat WITH
for the named set. In this case...