DAX Function Guide

CROSSJOIN
Empty image or helper icon

Sam McKay

CEO & Founder

How does the CROSSJOIN 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?

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

Loading

Considerations when using the CROSSJOIN?

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

Loading

Formula examples using the CROSSJOIN

CROSSJOIN( Colors, Stationery)

= CROSSJOIN (Salesperson,Products)

CrossJoin({[Qtr1], [Qtr2], [Qtr3]}, {[New York], [California], [Texas]})

Related Courses

Loading