Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
The following query is to merge all queries into a single one. I am using this query because it also loads a column with the name of the Query the data comes from. It "works" and shows the data in the Power Query Preview but it never loads it to the Model.
let
Source = #sections,
Section1 = Source[Section1],
convertTable = Record.ToTable(Section1),
#"Filtered Rows" = Table.SelectRows(convertTable, each ([Name] <> "Query1")),
#"Expanded Value" = Table.ExpandTableColumn(#"Filtered Rows", "Value", {"Col 1", "Col 2", "Col 3", "Col 4", "Col 5", "Col 6", "Col 7", "Col 8", "Col 9", "Col 10", "Col 11", "Col 12", "Col 13", "Col 14", "Col 15", "Col 16", "Col 17", "Col 18", "Col 19", "Col 20", "Col 21", "Col 22", "Col 23", "Col 24", "Col 25", "Col 26"}, {"Col 1", "Col 2", "Col 3", "Col 4", "Col 5", "Col 6", "Col 7", "Col 8", "Col 9", "Col 10", "Col 11", "Col 12", "Col 13", "Col 14", "Col 15", "Col 16", "Col 17", "Col 18", "Col 19", "Col 20", "Col 21", "Col 22", "Col 23", "Col 24", "Col 25", "Col 26"})
in
#"Expanded Value"
Preview showing the data:
However when Closing the Power query editor and loading the data this Query loads 0 Rows. It doesnt even say 0 rows, it just Completes the Refresh and it loads only the Columns/Field titles with zero data. Saving the file, Refreshing the data, it all works, every other query loads the Rows/Data perfectly fine, except this one.
This couldve been the fastest and easiest approach to merge all tables/queries and also have a column with the query name. Any help or workaround is appreciated. Thank you.
First of all this is not a merge. It is an append.
And then you are playing with fire (aka circular dependencies). It is also not necessary since queries cannot be created dynamically anyway.
A much simpler and safer approach would be Query1 = Query2 & Query3 & Query4 & Query5 etc. If you must, add the source column to each of the queries manually.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |