Data Analytics
explore our new search
Maximize Data with CROSSJOIN in Excel & PowerBI
Power BI
Mar 30, 2024 11:00 AM

Maximize Data with CROSSJOIN in Excel & PowerBI

by HubSite 365 about David Benaim

Data AnalyticsPower BILearning Selection

Unlock Excel & Power BIs potential with CROSSJOIN: Combine tables for all-in-one insights.

Key insights


  • CROSSJOIN combines every row from one table with every row from another table in Power Query, creating all possible combinations.
  • To perform a CROSSJOIN, you can use Merge Queries with a full outer join or by adding a helper column named "JoinKey" to both tables and merging based on this column.
  • Adding a helper column with a constant value ('1' in all rows) in both tables before merging can speed up the process for larger datasets.
  • After merging, it's necessary to expand the desired columns to get the combinations and then remove any unnecessary or temporary columns used for merging.
  • Be mindful that CROSSJOINs can significantly increase the size of your dataset, which is a crucial consideration for performance and manageability.

Understanding CROSSJOIN in Power Query and Power BI

CROSSJOIN is a powerful feature in Power Query and Power BI that allows users to merge two tables into every possible combination. This process, also known as a Cartesian Join, is particularly useful for creating exhaustive lists, such as all possible product and color combinations in a catalog, price matrices, or various scenario simulations.

While there are a few methods to achieve this, particularly using 'Merge Queries' with a full outer join or by introducing a helper column in both tables, both methods ultimately serve the purpose of generating exhaustive combinations. Users should take care to evaluate their dataset sizes before attempting a CROSSJOIN, as it can significantly inflate the number of rows in the result. This feature unlocks a new level of data analysis and manipulation in Excel and Power BI, empowering users to derive insights and results that weren't straightforward before.




In this video, David Benaim explores how to leverage the CROSSJOIN functionality to merge tables in Power Query, including in applications such as Excel and Power BI. This approach is instrumental in creating all possible combinations between data tables, which can be particularly beneficial for generating exhaustive lists, price matrices, or conducting simulations.

The video outlines two main methods to perform a CROSSJOIN in Power Query. The first method involves using the 'Merge Queries' feature with a 'Full Outer' join kind, where tables are imported, merged based on temporary columns, and then expanded to reveal all combinations. The second method enhances efficiency by incorporating a 'Helper Column' in both tables to facilitate the merge, resulting in a faster process for larger datasets.

An example scenario provided illustrates generating all combinations of products and colors, showcasing the practical utility of CROSSJOIN. Additionally, Benaim emphasizes the importance of being cautious with table sizes, as Cross Joins can substantially inflate datasets. Lastly, viewers are encouraged to reach out for a step-by-step walkthrough for specific examples or datasets, making the video a valuable resource for both beginners and advanced users looking to exploit CROSSJOIN capabilities in their data manipulation tasks.




People also ask

How do I join two tables in Power BI using Power Query?

Initiate the join process by clicking on the "add" button, following this action you will observe the structured outcome in the results pane.

How do I merge Excel tables in Power BI?

To aggregate Excel tables in Power BI, utilize the append function available on the "Edit Queries" screen, accessible via the Home tab.

How do I cross join two tables in Excel?

For executing a cross join, proceed to the Add Column segment of the ribbon, select Custom Column. Within the Custom Column formula editor, input the designation of the table you aim to join (for example, tasks). Also, assign a name to the custom column, like Task. Press OK, and though it might seem confusing initially, it's a step in the process.

What are the two options available in Power Query to combine multiple tables together?

Power Query furnishes two distinct methodologies for merging tables: 1. Inline Merge, which amalgamates data into your current query until a conclusive output is achieved, introducing a new step at the termination of the current query. 2. Intermediate Merge, leading to the development of a new query for every merge operation undertaken.



PowerQuery CROSSJOIN Excel, PowerBI CROSSJOIN Tutorial, Combine Tables PowerQuery, Excel PowerBI Integration, CROSSJOIN Function Guide, All Combinations Excel PowerQuery, PowerBI Table Combination, Excel PowerQuery CROSSJOIN Method