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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
robarivas
Post Patron
Post Patron

How to use Power Query (M) efficiently

I created "QueryZ" (using Append) that establishes a population of accounts coming from 2 tables. I want to use those accounts as a filter against other tables. So I do a Table.Join against some table (call it TableX) hoping the load process will only scan a limited number of rows from TableX. However, Power BI still seems to try to scan the entirety of TableX during the load process. Is there a best practice of how to do mergeing in Power Query (or otherwise leveraging the accounts from Query1) to prevent the load process from scanning the full TableX.

 

This issue is important to me because I happen to be dealing with massive tables so I need the tool to not evaluate excess rows unneccesarily.

2 REPLIES 2
ImkeF
Super User
Super User

You might experience this bug in query folding: http://www.thebiccountant.com/2017/07/20/sql-query-folding-bug-still-alive-sucking-powerbi-powerquer...

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

stretcharm
Memorable Member
Memorable Member

There are some tips on this page.

https://exceleratorbi.com.au/best-practices-power-pivot-power-query-power-bi/

 

Also you can turn on tracing from the setting menu which may help you see what it's doing and if any changes are making it better or worse.

 

There are some buffer functions that may help.

https://blog.crossjoin.co.uk/2015/05/05/improving-power-query-calculation-performance-with-list-buff...

 

Some posts that may have useful details

https://community.powerbi.com/t5/Desktop/How-to-Improve-Query-Reference-performance-for-large-tables...

http://community.powerbi.com/t5/Desktop/merging-tables-very-slow-performance/td-p/122730

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.