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.
I want to combine two tables with different number of columns.
Both tables has same common fields as A & B and would like to combine that will result to a table having fields: A, B, C, D, E, F, G, H, I, J. Kindly help.
TABLE 1 | TABLE 2 | |||
COLUMN | COLUMN | |||
KEY FIELD | A | KEY FIELD | A | |
KEY FIELD | B | KEY FIELD | B | |
COLUMN | C | COLUMN | G | |
COLUMN | D | COLUMN | H | |
COLUMN | E | COLUMN | I | |
COLUMN | F | COLUMN | J |
Solved! Go to Solution.
Hi @marbi Create a UNION SQL query combining the tables, ensuring missing columns are filled with NULL and matching fields like A and B align. Use Advanced Query Editor in Power BI to input the query in DirectQuery mode. Verify data types of common fields (A and B) match in both tables for proper merging.
Hi @marbi
Can you please try similar SQL Code for your solution in Direct Query mode
Write this SQL in SQL Query box
SELECT
T1.KEY FIELDA,
T1.KEY FIELDB,
T1.COLUMN C,
T1.COLUMN D,
T1.COLUMN E,
T1.COLUMN F,
T2.COLUMN G,
T2.COLUMN H,
T2.COLUMN I,
T2.COLUMN J
FROM
TABLE1 T1
FULL OUTER JOIN
TABLE2 T2 ON T1.KEY FIELDA = T2.KEY FIELDA AND T1.KEY FIELDB = T2.KEY FIELDB;
Proud to be a Super User! | |
Hi @marbi,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you are trying to merge columns from two different tables. As @PijushRoy and @Akash_Varuna both responded to your query, kindly go through their responses and check if it solves your query.
I would also take a moment to thank @PijushRoy and @Akash_Varuna, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @marbi,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Hi @marbi,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.
Hi @marbi,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @marbi
Can you please try similar SQL Code for your solution in Direct Query mode
Write this SQL in SQL Query box
SELECT
T1.KEY FIELDA,
T1.KEY FIELDB,
T1.COLUMN C,
T1.COLUMN D,
T1.COLUMN E,
T1.COLUMN F,
T2.COLUMN G,
T2.COLUMN H,
T2.COLUMN I,
T2.COLUMN J
FROM
TABLE1 T1
FULL OUTER JOIN
TABLE2 T2 ON T1.KEY FIELDA = T2.KEY FIELDA AND T1.KEY FIELDB = T2.KEY FIELDB;
Proud to be a Super User! | |
Hi @marbi Create a UNION SQL query combining the tables, ensuring missing columns are filled with NULL and matching fields like A and B align. Use Advanced Query Editor in Power BI to input the query in DirectQuery mode. Verify data types of common fields (A and B) match in both tables for proper merging.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
37 |