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
Anonymous
Not applicable

two columns from two table has one to many relation, how can I combine them into a single table?

two columns from two table has one to many relation, how can I combine them into a single table? I want to make a null or 0 if there is mismatch

4 REPLIES 4
v-weiyan1-msft
Community Support
Community Support

Hi @Anonymous ,

 

From your description,
I think you could try joining the two tables together using a merge query.
My Sample:
Table1:

vweiyan1msft_0-1705813852932.png

Table2:

vweiyan1msft_1-1705813869739.png

vweiyan1msft_2-1705813894369.png

The operation is shown below:

In Power Query Editor, select Merge queries.

vweiyan1msft_3-1705813914278.png

vweiyan1msft_4-1705813922504.png

Then choose to expand the fields in the new table column.

vweiyan1msft_5-1705813965602.png

Result is as below.

vweiyan1msft_6-1705813994634.png


If you want to know more about the Merge queries, you can refer to the following link.

Merge queries overview - Power Query | Microsoft Learn


Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file whether it suits your requirement.

It is for creating a new table.

Jihwan_Kim_0-1705429322117.png

 

Jihwan_Kim_1-1705429489431.png

 

expected result table = 
	SUMMARIZE(
		'Sales',
		'Customer'[customer key],
		'Sales'[shop],
		'Sales'[quantity],
		'Customer'[customer name]
	)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi, thanks for helping. when I tried this on my file, it will not let me pick the second table. 

for example, once I have 'Table 1' after summarize, I can not have 'Taable 2' [Column 1]

Hi, thank you for your message, and I think it is related to the relationship issue.

Please share your sample pbix file and then I can try to look into it.

thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.