Named Set Builder

Analysis Services

Analysis Services

Named Set Builder

Use this tool to create an expression to define a named set in the Multidimensional Expressions (MDX) syntax. You can build the MDX expression for the named set by using appropriate combinations of the Data box, Functions box, Insert button, arithmetic operator buttons, and number buttons, or by typing an expression directly into the Set expression box.

This tool appears when you are creating a new named set in either Cube Editor or Virtual Cube Editor.

Options

Set name

Enter a name for the new named set.

Set expression

Type the MDX expression to define the named set.

Important  The Data and Functions boxes provide a convenient means for building valid expressions. You can either double-click or drag values from both boxes to add them to the Set expression box. However, to add functions from libraries other than the Microsoft® SQL Server™ 2000 Analysis Services MDX function library, you may need to type expressions containing such functions directly into the Set expression box.

Data

Select the data structures in the cube that can be used as elements of the MDX expression.

Functions

Select the functions in the Analysis Services MDX function library and any additional libraries that have been registered. For more information about the functions, see Function List. For information about an individual Analysis Services MDX function, select it, and then press F1.

To add a function to the Set expression box, place the cursor where you want to insert the function, select a function in the Functions box, and click Insert. The function syntax appears in the Set expression box. Replace arguments and their delimiters (« and ») with the appropriate values.

Insert

Click to add the item selected in the Data box or Functions box to the Set expression box.

Arithmetic operator buttons

Click to add operators to the Set expression box.

Number buttons

Click to add numbers to the Set expression box.

Register

Click to display the Register Function Libraries dialog box, where you can register an external function type library (*.olb, *.tlb, *.dll). The new library will appear in the Functions box. For more information, see Register Function Libraries Dialog Box.

MDX Usage Notes

You can use the following techniques when you create MDX expressions:

  • Null keyword

    You can use the keyword Null to create an MDX expression whose value is null.

  • Temporary alias for a set

    A set in a function can be given a temporary alias for use within the function by using the keyword As. In this example, the set {State} is given the temporary alias S1 so it can be referred to later in the function in a nested iteration.

    Sum({State} As S1, Sum(Geography.CurrentMember.Children,
    Population * Val((Geography.CurrentMember.Properties("CityTax")) + 
    Val(S1.Current.Properties("StateTax")))))
    

See Also

Named_Sets