Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Hi @Anonymous ,
From your description,
I think you could try joining the two tables together using a merge query.
My Sample:
Table1:
Table2:
The operation is shown below:
In Power Query Editor, select Merge queries.
Then choose to expand the fields in the new table column.
Result is as below.
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.
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.
expected result table =
SUMMARIZE(
'Sales',
'Customer'[customer key],
'Sales'[shop],
'Sales'[quantity],
'Customer'[customer name]
)
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.
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |