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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
GilesFS
Frequent Visitor

Slow data refresh due to merges? (Power Query optimisations)

Hi all,

 

We have a PowerBI Pro licence and the refresh of one of our PowerBI datasets is taking between 1hr and over 2 hours (at which point it fails due to timeout). The volumes of data are not huge but I believe it may be due to the way the PowerBI merges data from differnet sources.

 

As I understand, the way the merge operates is that, rather than load both sources tables initially (two single requests to the source tables) and then join to create the combined table, it starts with one table then makes individual calls to the other source table for every line.

 

I have tried creating separate queries in the Power Query window pointing to the individual source tables and then joining those queries in a separate query, but that hasn't helped (so I suspect it doesn't actually load the data in those initial queries, but just uses them as a reference).

 

I'm thinking about adding a couple of simple query steps to those initial queries (e.g. add a dummy row), to see if that forces an actual load of the table, which then gets used in the subsequent join query to reduce the number of requests going out to he source tables.

 

I was just wondering if anyone had come across or tried anything similar before?

 

Thanks

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Merges can get slow, but that sounds ways too long.  Can you share your M code for your queries from the Advanced Editor?

 

You may be interested in this 3-part series by Chris Webb.

Chris Webb's BI Blog: Optimising The Performance Of Power Query Merges In Power BI, Part 1: Removing...

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks Pat,

 

Hard to share all the M code as there are a total of 30 queries in the file, which pull data from 17 tables from 2 sources and then perform different transformations to get to the final tables for reporting. (Unless you know of a way of grabbing all the M-code in one go?).

 

I appreciate I'm probably using Power Query as more of an ETL tool than it is possibly intended for.

 

Thanks for the Chris article, very interesting, but not sure I can reduce the number of columns in the underlying tables (and they're not in databases where I could create a view with reduced columns). But useful insight nevertheless!

You can do some serious ETL with M.  I didn't realize you were doing many merges.  If you suspect it is repeating steps with for each row (seeing the M would have highlighted that potentially), you can incorporate Table.Buffer() with your query to greatly speed things up.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors