November 27, 2020
Hi, this is the table I want to 'buffer", but I do not know how to insert the buffer command.
Please assist? That will be greatly appreciated.
Also a short explanation of how to use the Table.Buffer function please.
let
Source = Excel.Workbook(Web.Contents ("https://pgza-my.sharepoint.com/personal/zzz_xxx_onmicrosoft_com/Documents/BITgh/MARC%20Tgh.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Removed Columns" = Table.RemoveColumns(Sheet1_Sheet,{"Column5", "Column8", "Column9", "Column11", "Column12", "Column15", "Column16", "Column17", "Column23", "Column14"}),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Columns", [PromoteAllScalars=true]),
#"Trimmed Text" = Table.TransformColumns(#"Promoted Headers",{{"Material number", Text.Trim, type text}}),
#"Added Conditional Column" = Table.AddColumn(#"Trimmed Text", "MN", each if Text.StartsWith([Material number], "000000") then [Material number] else 0),
#"Changed Type" = Table.TransformColumnTypes(#"Added Conditional Column",{{"MN", Int64.Type}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"MN", type text}}),
#"Added Conditional Column1" = Table.AddColumn(#"Changed Type1", "Material Number", each if [MN] <> "0" then [MN] else [Material number]),
#"Removed Columns1" = Table.RemoveColumns(#"Added Conditional Column1",{"MN", "Material number"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns1",{"Material Number", "Plant", "A.scrap", "Status", "Typ", "MRPC", "Min. Lot Sze", "Stock in Transit", "Do not cost", "Material group", "Procure type", "Special procure type", "Prod supervisor"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Reordered Columns",{{"Material Number", type text}, {"Plant", type text}, {"A.scrap", type number}, {"Status", type text}, {"Typ", type text}, {"MRPC", type text}, {"Min. Lot Sze", Int64.Type}, {"Stock in Transit", Int64.Type}, {"Do not cost", type text}, {"Material group", type text}, {"Procure type", type text}, {"Special procure type", type text}, {"Prod supervisor", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type2",{{"Material group", "Material Route"}}),
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Mat & Plant", each [Material Number]&[Plant]),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom",{{"Mat & Plant", type text}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type3", "Mat and Proc", each [Material Number]&[Procure type]),
#"Merged Queries" = Table.NestedJoin(#"Added Custom1", {"Material Number"}, MARA, {"Material Number"}, "MARA", JoinKind.LeftOuter),
#"Expanded MARA" = Table.ExpandTableColumn(#"Merged Queries", "MARA", {"Material group", "Material descrip"}, {"Material group", "Material descrip"}),
#"Changed Type4" = Table.TransformColumnTypes(#"Expanded MARA",{{"Mat and Proc", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type4", each ([Plant] = "1205" or [Plant] = "1206"))
in
#"Filtered Rows"
Regards
Vicky
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Vicky,
You have to identify the step that slows down your query and use Table.Buffer in the previous step.
As an example, if the #"Merged Queries" step is slow, use table Buffer in step #"Added Custom1":
#"Added Custom1" = Table.Buffer(Table.AddColumn(#"Changed Type3", "Mat and Proc", each [Material Number]&[Procure type])),
Please don't create multiple topics with the same question, thanks for understanding.
1 Guest(s)