Forum Discussion
Ohad
9 years agoFrequent Visitor
Union two tables with different columns names
Hi, I have two tables with different names for the columns but with the same meaning and I need to union the two tables to one table with the names of the columns in table A. Do I need to create...
- 9 years ago
Hi Ohad,
In this scenario, you can also try the Append Queries option in Query Editor.:smileyhappy:
1. Rename the three columns in Table B with the column names in Table A.
2. Select Table A, and choose "Append Queries as New" under Home tab in Query Editor.
Regards
rocky09
Solution Sage
9 years agouse union query:
https://msdn.microsoft.com/en-us/library/dn802530.aspx
newTable = UNION(TableA,TableB)
Store_NameStore_NummberOpening_Date
| New York | 1 | 1/1/2017 |
| Boston | 2 | 2/1/2017 |
MarcelBeug
Community Champion
9 years agoThat looks like an excellent solution to me.
If, for some reason, you prefer a Power Query solution: this video shows how you can create a rename list and combine the tables after renaming columns using the rename list. In the video it is done in Excel, but can likewise be applied in Power BI.