Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

How to use Table.Buffer inside a function ?

  • 1.  How to use Table.Buffer inside a function ?

    Bronze Contributor
    Posted Sep 13, 2021 08:38 AM

    Hello Folks!

     

    I'm using a fucntion to make the correction of 3 columns on my fact table

     

    fxPlateCorrections = (Start as date,End as date,Plate as text)=>

    let

     

    Source= #"goals by plate",

       Custom1 = Table.SelectRows(Source, each Start >=  [Date Start]  and End <= [Date End]  and [original_plate] = Plate)

    in

       Custom1

     

    How far as I know it's not possible to include a Table.Buffer when you call a function, so where should I include the Table.Buffer?

     

    1. Table.Buffer(Table.SelectRows(...
    2. Table.SelectRows(Table.Buffer(....
    3. Source= Table.Buffer(#"goals by plate"),

     

     

     

     

     

     



  • 2.  RE: How to use Table.Buffer inside a function ?

    Posted Sep 13, 2021 09:26 AM
    Hi @Gustavo Leo,

    If you want to load the full #"goals by plate" table into memory
    C.
    Source= Table.Buffer(#"goals by plate") is the way to do it.

    Quick note.
    Load the smallest possible table into memory so if that contains more columns or rows than you actually require, remove them before you buffer.

    I hope this is helpful

    ------------------------------
    Melissa de Korte
    ------------------------------