I should also note that I am running a power query with the following code before loading it to power pivot:
let
Source = Excel.Workbook(File.Contents("C:\Users\rjg01\Documents\DATAMODEL FILES\ORDER_LINES_TABLE-1.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each ([Kind] = "Table")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Name", "Data"}),
#"Expanded Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", {"Order", "Line", "Customer Site Date", "Site Date Actual", "Due Date", "Earliest Delivery Date", "Ship Date Actual", "Last Ship Date", "Qty Ordered", "Invoiced", "Status", "Item", "Customer Item", "Unit Price", "Est Cost", "Approval Drawing Due", "Approval Drawing Actual", "Approval Drawing Returned", "Approval Drawing Returned2", "BOM Release Due", "BOM Release Actual", "Ship To", "Job", "Serial Number"}, {"Order", "Line", "Customer Site Date", "Site Date Actual", "Due Date", "Earliest Delivery Date", "Ship Date Actual", "Last Ship Date", "Qty Ordered", "Invoiced", "Status", "Item.1", "Customer Item", "Unit Price", "Est Cost", "Approval Drawing Due", "Approval Drawing Actual", "Approval Drawing Returned", "Approval Drawing Returned2", "BOM Release Due", "BOM Release Actual", "Ship To", "Job", "Serial Number"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Data",{{"Item.1", "Item"}}),
#"Cobmined Forecast" = Table.Combine({#"Renamed Columns", FORECAST_LINES}),
#"Added Index1" = Table.AddIndexColumn(#"Cobmined Forecast", "Index", 1, 1),
#"Sorted Index Ascending" = Table.Sort(#"Added Index1",{{"Index", Order.Ascending}}),
#"Add CB Qty." = Table.AddColumn(#"Sorted Index Ascending", "CB Unit", each if Text.StartsWith([Item], "X") then [Qty Ordered] else if List.AllTrue({Text.StartsWith([Item], "ZGCB"),[#"Unit Price"] > 30000}) then if [Qty Ordered] > 1 then 1 else [Qty Ordered] else 0, type number),
#"Removed Columns" = Table.SelectColumns(#"Add CB Qty.",{"Order", "Line", "Index", "CB Unit"}),
#"Buffered Table" = Table.Buffer(#"Removed Columns")
in
#"Buffered Table"
I should further note that, without any modifications in Power Query, my data file, in Power Pivot, has no problems performing a similar expanding range summation. It only takes a few seconds to calculate over the 150K rows. Therefore, I must have some issue in Power Query.
I've looked into buffering my table, but that has not helped me. Perhaps, I'm not buffering at the right places?