Crossjoin

Analysis Services

Analysis Services

Crossjoin

Returns the cross product of two sets.

Syntax

Crossjoin(«Set1», «Set2»)

Alternate Syntax

«Set1» * «Set2»

Note  This alternate syntax is a Microsoft® SQL Server™ 2000 Analysis Services extension to Multidimensional Expressions (MDX) in OLE DB 2.0 and later.

Remarks

The order of tuples in the resulting set depends on the order of «Set1» and «Set2» and the order of their members.

If «Set1» = {x1, x2,...,xn} and «Set2» = {y1, y2, ..., yn}, then Crossjoin(Set1, Set2) is:

{(x1, y1), (x1, y2),...,(x1, yn), (x2, y1), (x2, y2),...,

(x2, yn),..., (xn, y1), (xn, y2),..., (xn, yn)}

Example

The following example returns {([1994], USA), ([1994], Japan), ([1995], USA), ([1995], Japan)}:

CrossJoin({[1994], [1995]}, {USA, Japan})