CROSSJOIN Function (DAX)
Returns a table that contains the Cartesian product of all rows from all tables in the arguments. The columns in the new table are all the columns in all the argument tables.
Any DAX expression that returns a table of data
A table that contains the Cartesian product of all rows from all tables in the arguments.
Column names from table arguments must all be different in all tables or an error is returned.
The total number of rows returned by CROSSJOIN() is equal to the product of the number of rows from all tables in the arguments; also, the total number of columns in the result table is the sum of the number of columns in all tables. For example, if TableA has rA rows and cA columns, and TableB has rB rows and cB columns, and TableC has rC rows and cC column; then, the resulting table has rA × rb × rC rows and cA + cB + cC columns.
The following example shows the results of applying CROSSJOIN() to two tables: Colors and Stationery.
The table Colors contains colors and patterns:
The table Stationery contains fonts and presentation:
The expression to generate the cross join is presented below:
CROSSJOIN( Colors, Stationery)