Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

M-Code "Table.buffer"

Hi 

 

in my Bi File i have merged historical files in one table and i wish to use below M-Code or only Table.Buffer , due to lack of knowledge i not understanding where do i need to use this M-Code( Ref https://www.myonlinetraininghub.com/excel-forum/power-query/any-way-to-speed-up-really-slow-refresh-times-in-power-query

 

Table.Buffer(Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]),

 In my query from my data source i have filtered column by folder location and then split the column for saperating dates from file name and then i added column by using Excel.Workbook([Content]) and after excending that coulumn i used Table.PromoteHeaders(Table.RemoveRows([Data],0,2)) for having table headers and then i am using my data in BI File 

 

Please note that i have link data through Power BI Dataflow to BI report

Please guide me 

 

  • Hi Anonymous ,

     

    Did you find the info you need? The use of Table.Buffer can require quite a bit of trial and error to get right and really does vary from query to query. Firstly, in the code you posted, you need to move the Table.Buffer inside the "="

     

     

    //Change this...
    Table.Buffer(Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]),
    
    //To this...
    Source = Table.Buffer(Excel.CurrentWorkbook(){[Name="Table1"]}[Content])),

     

    Secondly, and perhaps more importantly, that may not be the right step to introduce the buffer. If you can post more complete code you might make it easier for others to assist.

     

    Regards,

    Kim 

3 Replies

  • KNP's avatar
    KNP
    Super User

    Hi Anonymous ,

     

    Did you find the info you need? The use of Table.Buffer can require quite a bit of trial and error to get right and really does vary from query to query. Firstly, in the code you posted, you need to move the Table.Buffer inside the "="

     

     

    //Change this...
    Table.Buffer(Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]),
    
    //To this...
    Source = Table.Buffer(Excel.CurrentWorkbook(){[Name="Table1"]}[Content])),

     

    Secondly, and perhaps more importantly, that may not be the right step to introduce the buffer. If you can post more complete code you might make it easier for others to assist.

     

    Regards,

    Kim 

  • dax's avatar
    dax
    Community Support

    Hi Anonymous , 

    If you want to know the table.buffer' s function, you could refer to Improving Power Query Calculation Performance With List.Buffer()  and Performance tip for List.Generate (1): Buffer your tables in Power BI and Power Query  for details.

    If you want to to combine two files, please inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I was looking for solution for getting refresh my query in power query and Power BI Dataflow.

       

      i found this M-coad to be used but as i am not much familier with M-code that why i reach at super users