TechNet
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Collapse the table of content
Expand the table of content
Expand Minimize
This documentation is archived and is not being maintained.

Intersect (MDX)

Updated: 17 July 2006

Returns the intersection of two input sets, optionally retaining duplicates.


Intersect(Set_Expression1 , Set_Expression2 [ , ALL ] )

Set_Expression1

A valid Multidimensional Expressions (MDX) expression that returns a set.

Set_Expression2

A valid Multidimensional Expressions (MDX) expression that returns a set.

The Intersect function returns the intersection of two sets. By default, the function removes duplicates from both sets prior to intersecting the sets.

The optional ALL flag retains duplicates. If ALL is specified, the Intersect function intersects nonduplicated elements as usual, and also intersects each duplicate in the first set that has a matching duplicate in the second set.

Example

For example, Intersect({[1994], [1995], [1996]}, {[1995], [1996], [1997]}) returns the set {[1995], [1996]}.

Release History

17 July 2006

Changed content:
  • Updated syntax and arguments to improve clarity.
  • Added updated examples.
Show:
© 2016 Microsoft