CROSSJOIN Function (DAX)
How does the CROSSJOIN function (DAX) work?
The CROSSJOIN is a DAX formula function that generates the Cartesian product of all the rows in the tables within the formula argument.
CROSSJOIN Formula Syntax
CROSSJOIN(
<table>, <table>[, <table>]…
)
How do you use the CROSSJOIN function?
This function is used to crossjoin the rows and columns, and also to bring out similar values. Use CROSSJOIN when you create a combination of every row from two tables. A common scenario in which CROSSJOIN is used is when you want to have combinations of items.
Related Blog Posts
Considerations when using the CROSSJOIN function
Column names from table parameters must be different in the tables or an error will return. The total number of rows is equal to the product of the number of rows from all tables within the argument. The total number of columns is the sum of the number of columns from all the tables in the parameters.
Related Video Tutorials
Formula examples using the CROSSJOIN function
CROSSJOIN( Colors, Stationery)
= CROSSJOIN (Salesperson,Products)
CrossJoin({[Qtr1], [Qtr2], [Qtr3]}, {[New York], [California], [Texas]})