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.
Dear All,
I tried to solve my problem by myself but it did not work.
I would need your help in the follwoing topic.
In the Query Editor I have 3 different tables, with different strucutre.
I would like to combine from these 3 tables only specific columns in a new table.
This I would like to do already in the Query Editor and not outside query editor with union and selectedcolumns.
Could you please help me how does it work in query editor?
Thank you very much for your help.
Br
Feri
Could you please give
Solved! Go to Solution.
Hi
As you said, you want to combine from these 3 tables only specific columns in a new table but to do it in the Query Editor instead of using DAX function “ union and selectedcolumns”.
Here is a simple example to do this.
Select the first two columns from each table of the three tables(eg. From excel) and add them into a new table.
Table1
Table2
Table3
New Table
In query editor, New Source>Blank Query, code in advanced editor,
let
Source1 = Table1,
Source2 = Table2,
Source3 = Table3,
AppendColumns1=Table.SelectColumns(Source1, {"columnA","columnB"}),
AppendColumns2=Table.SelectColumns(Source2, {"columnC","columnD"}),
AppendColumns3=Table.SelectColumns(Source3, {"columnE","columnF"}),
RenameAppendColumns2 = Table.RenameColumns(AppendColumns2,{{"columnC", "columnA"}, {"columnD", "columnB"}}),
RenameAppendColumns3 = Table.RenameColumns(AppendColumns3,{{"columnE", "columnA"}, {"columnF", "columnB"}}),
#"Appended Query1" = Table.Combine({AppendColumns1, RenameAppendColumns2}),
#"Appended Query2" = Table.Combine({#"Appended Query1", RenameAppendColumns3})
in
#"Appended Query2"
Best Regards
Maggie
Hi
As you said, you want to combine from these 3 tables only specific columns in a new table but to do it in the Query Editor instead of using DAX function “ union and selectedcolumns”.
Here is a simple example to do this.
Select the first two columns from each table of the three tables(eg. From excel) and add them into a new table.
Table1
Table2
Table3
New Table
In query editor, New Source>Blank Query, code in advanced editor,
let
Source1 = Table1,
Source2 = Table2,
Source3 = Table3,
AppendColumns1=Table.SelectColumns(Source1, {"columnA","columnB"}),
AppendColumns2=Table.SelectColumns(Source2, {"columnC","columnD"}),
AppendColumns3=Table.SelectColumns(Source3, {"columnE","columnF"}),
RenameAppendColumns2 = Table.RenameColumns(AppendColumns2,{{"columnC", "columnA"}, {"columnD", "columnB"}}),
RenameAppendColumns3 = Table.RenameColumns(AppendColumns3,{{"columnE", "columnA"}, {"columnF", "columnB"}}),
#"Appended Query1" = Table.Combine({AppendColumns1, RenameAppendColumns2}),
#"Appended Query2" = Table.Combine({#"Appended Query1", RenameAppendColumns3})
in
#"Appended Query2"
Best Regards
Maggie
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 | |
71 | |
37 | |
30 | |
28 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
36 |