ExpandLevels

ExpandLevels(1, «InputSet») returns any members that are not descendants from the input set.

ExpandLevels(N, «InputSet») where N > 1 returns a set that consists of elements produced by ExpandLevels(1, «InputSet»), followed by N-1 calls to DrillDownInSet(ResultSet, InputSet).

ExpandLevels function retains duplicates.

In this case, the number of levels is the number of levels within the input set, not within the hierarchy.

Syntax

«ResultSet» ExpandLevels(N, «InputSet»)

Example 1

In this example, the result is members from the [BaseSet] that are not descendants of other members in the set.

ExpandLevels(1, [BaseSet])

Example 2

In this example, the result is from ExpandLevels(1) and DrillDownInSet. The DrillDownInSet is using the result of ExpandLevels(1).

ExpandLevels(2, [BaseSet])

Example 3

In this example, the result is a combination from ExpandLevels(1) plus the first and second DrillDownInSet. In the first DrillDownInSet, it is using the result of ExpandLevels(1). On the second DrillDownInSet, it is using the result of previous DrillDownInSet.

ExpandLevels(3, [BaseSet])