Forum Discussion
Merge tables using Direct Query
- 1 year ago
Hi Anonymous 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.
- 1 year ago
Hi Anonymous
Can you please try similar SQL Code for your solution in Direct Query mode
Write this SQL in SQL Query boxSELECT 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;
Hi Anonymous,
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 Anonymous,
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.