SetToArray

Return to: Calculated Member Builder Function List

Converts one or more sets to an array for use in a user-defined function.

Syntax

SetToArray(«Set»[, «Set»]...[, «Numeric Expression»])

Remarks

Converts one or more sets to an array for use in a user-defined function. The number of dimensions in the resulting array is the same as the number of sets specified.

The optional numeric expression can be used to provide the values in the array cells. If omitted, the default value of the set member is used for the array cell value.

The cell coordinates in the resulting array correspond to the position of the sets in the list. For example, SetToArray(SA, SB, SC), where each set has two elements, produces the three-dimensional array:

(SA1, SB1, SC1) (SA2, SB1, SC1) (SA1, SB2, SC1) (SA2, SB2, SC1)

(SA1, SB1, SC2) (SA2, SB1, SC2) (SA1, SB2, SC2) (SA2, SB2, SC2)

Example

SetToArray(Geography.Members, Measures.Sale)

 

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.