---
schema_version: "1"
id: a4a7e856773ddd107ed91b62dbc97292248053db9495bd6e1b3c601d944137ee
title: Cross Join
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_data_prep_recipe_transformation_crossjoin.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_data_prep_recipe_transformation_crossjoin.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a2396fa425b10badb05ae98ba1c3ed56b3ba2f5866155a0ee3a0dfde2c9fae83
description: In CRM Analytics, a cross join combines unrelated records and includes all rows from the left (recipe data) and the right. Unlike other joins that use keys to find matches, the cross join pairs every row from one dataset with every row of another dataset (known as the Cartesian Product).
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Cross Join

In CRM Analytics, a cross join combines unrelated records and includes all rows from the left (recipe data) and the right. Unlike other joins that use keys to find matches, the cross join pairs every row from one dataset with every row of another dataset (known as the Cartesian Product).

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in Salesforce Classic and Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with CRM Analytics, which is available for an extra cost in <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions. Also available in <strong>Developer</strong> Edition.</td></tr></tbody></table>

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_tip.png)

Tip When designing a cross join, use the larger dataset first (left) and then join the smaller dataset (right). For example, join a:

- 10,000-row dataset (left) with a 1,000-row dataset (right)
- 20,000-row dataset (left) with a 500-row dataset (right)
- 40,000-row dataset (left) with a 250-row dataset (right)
- 100,000-row dataset (left) with a 100-row dataset (right)

Example

A company sells products at various locations. To assist with stock tracking, use a cross join to combine the product and store datasets to find all the possible pairs of product and store.

Consider the following two data streams that feed the recipe’s target dataset. To illustrate how this join combines unrelated records, row number is included for reference but isn’t needed in the data.

![The left data stream shows the row number and product. The right data stream shows the row number and store.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_data_prep_recipe_transformation_crossJoin_dataStreams.png)

After performing the cross join, the recipe produces this target dataset.

![The new dataset contains columns from both data streams.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_data_prep_recipe_transformation_crossJoin_results.png)

Limitations for Cross Join

Because a cross join creates a larger dataset than either of the source datasets, it has some limitations. Keep these points in mind when designing and testing your cross join.

- Only one cross join per recipe
- Cross join results maximum of 10 million
- Left dataset column maximum of 8 and row maximum of 100,000
- Right dataset column maximum of 8 and row maximum of 1,000
- Doesn’t support mulit-value columns

#### See Also

- [Join Node: Add Related Columns of Data to the Recipe](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_join_data.htm&release=264.0.0&type=5 "Use a join node in CRM Analytics to add columns of data from related objects to existing data in a recipe. When working with CRM Analytics datasets and external objects, add a join node on the recipe canvas. When working with Salesforce objects, you can either create a join on the recipe canvas or join the data when you first create your dataset on the Add Input Data screen.")