Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How do I use table.buffer to speed up a query? (How do I create M code for table.buffer?)

I've seen a number of posts that talk about adding table.buffer to queries to speed things up. I'm pretty new to PowerBi and I'd like to try this, but I'm unclear exactly how to add table.buffer? I k...
  • Mariusz's avatar
    6 years ago

    Hi Anonymous 

     

    Table Buffer is not a magical function that will make every code run faster, it is beneficial in situations where you have small tables that you have to reiterate over and over again, the way it works is: it loads the specified table into the memory so it can be accessed there through the execution.

    You can add an extra step in your code like: 

    step = Table.Buffer( previous step or table )

      and later refer to this "step" in the following steps.

     

    If this table is too big or you not iterating it multiple times, then it might result in worse performance.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn