Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
RaidSlayer
New Member

Query Not loading Data to Model/Merging all queries into one.

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:

RaidSlayer_0-1678915787191.png

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.

RaidSlayer_1-1678916120502.png

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.

1 REPLY 1
lbendlin
Super User
Super User

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.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.