Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Charmaine
Frequent Visitor

expand and merge tables (without identical columns)

Hi all, I would like to join two tables. or it is actually adding a new expanded column. The situation is as screenshot. 

Any idea how to complete this in Power BI? Thank you 😉 

song.png

2 ACCEPTED SOLUTIONS

Hi @Charmaine,

I reproduce your scenario and get expected result.

Please click "New Table" under Modeling on Home page, type the following formula, you will get expected table.

Result Table = CROSSJOIN(Table1,Table2)


2.PNG

You can download the attachment for more details.

Best Regards,
Angelia

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

 

This can be done quite easily in the Query Editor.  You may download my file from here.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

This can be done quite easily in the Query Editor.  You may download my file from here.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
eniX
Helper III
Helper III

Hi,

 

1) create a new calculated column with a single value (i.e. column "join_key" with value "1" for all rows) in both tables

2) merge tables on this column

3) expand second table

4) delete join_key column(s)

 

eniX.

Hi eniX, thanks for your guidance. but the error as below shown. I have tried to remove duplicates..

 

sss.png

Hi @Charmaine,

I reproduce your scenario and get expected result.

Please click "New Table" under Modeling on Home page, type the following formula, you will get expected table.

Result Table = CROSSJOIN(Table1,Table2)


2.PNG

You can download the attachment for more details.

Best Regards,
Angelia

Just a shot in the dark but I would guess you merged in the same query, not in the separate one. Your existing relationsship turns then from m:1 to m:n, so to an M2M (many-to-many) relationship, which is not possible in Power BI. A common workaround for this issue is to create a so called bridge table (or use an existing one).

 

Try to use table1 or table2 in your first post as the bridge table (I don't know which column you use for the relationship)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors