How to Crossjoin or Create a Cartesian Product in Power Query

Viewed 19

Can I use power query to combine two tables, so that each rows in table 1 contains all rows in table 2.

For example table 1 includes: customer a, customer b, customer c table 2 includes: product 1, product 2.

I want to combine two tables into table 3: customer a product 1, customer a product 2, customer b product 1, customer b product 2, customer c product 1, customer c product 2

2 Answers

Yes, it is called a Cartesian join.

Add a column to table 1 with the following code

= Table2

Then expand to new rows by clicking the arrows at the top of the column.

enter image description here

Plain vanilla, you can find a simple example in the Microsoft documentation: Cross-Join

Related