I have an issue: when I try to expand table from many files I'm losing some of the values.
What I have figured out so far the problem starts when the query met a empty table.
I have tried to filter out the empty tables but the problem is still there.
Any idea what is a issue and how to resolve it?

Query:
let
Source = Folder.Files("X:\Operations\tutaj\SLA MIAD"),
#"Lowercased Text" = Table.TransformColumns(Source,{{"Extension", Text.Lower, type text}}),
#"Filtered Rows" = Table.SelectRows(#"Lowercased Text", each Text.Contains([Extension], "xlsx")),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each Text.Contains([Name], "NCR") or Text.Contains([Name], "Printec") or Text.Contains([Name], "PTL")),
#"Filtered Rows2" = Table.SelectRows(#"Filtered Rows1", each Text.Contains([Name], "2018")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows2",{"Content"}),
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Custom", each Excel.Workbook([Content])),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name", "Data", "Item", "Kind", "Hidden"}),
#"Filtered Rows3" = Table.SelectRows(#"Expanded Custom", each ([Kind] = "Sheet")),
#"Filtered Rows4" = Table.SelectRows(#"Filtered Rows3", each Text.Contains([Name], "SLA report")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows4",{"Name", "Item", "Kind", "Hidden"}),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Removed Columns", {"Content"}),
#"Invoked Custom Function" = Table.AddColumn(#"Removed Errors", "TestFunction", each FileQuery([Data])),
#"Added Custom1" = Table.AddColumn(#"Invoked Custom Function", "Custom", each Table.IsEmpty([TestFunction])),
#"Filtered Rows6" = Table.SelectRows(#"Added Custom1", each ([Custom] = false)),
#"Expanded TestFunction" = Table.ExpandTableColumn(#"Filtered Rows6", "TestFunction", {"Order ID", "ATM", "City", "Country", "CIT/Vault", "Service", "SLACategory", "Condition", "Serv Acc Mon", "Serv Acc Sat", "Serv Acc Sun", "Status", "Reason", "Description", "Created(CET)", "SLA Target Date(CET)", "Closed(CET)", "Age", "Contractual Reaction Time", "Overdue By absolute", "Overdue By Srv.Hrs", "On Time", "Charged call", "Reference ID", "Reference priority", "Comments", "SLA Category"}, {"Order ID", "ATM", "City", "Country", "CIT/Vault", "Service", "SLACategory", "Condition", "Serv Acc Mon", "Serv Acc Sat", "Serv Acc Sun", "Status", "Reason", "Description", "Created(CET)", "SLA Target Date(CET)", "Closed(CET)", "Age", "Contractual Reaction Time", "Overdue By absolute", "Overdue By Srv.Hrs", "On Time", "Charged call", "Reference ID", "Reference priority", "Comments", "SLA Category"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Expanded TestFunction",{"Order ID", "ATM", "City", "Country", "CIT/Vault", "Service", "Condition", "Reason", "Status", "Description", "Created(CET)", "SLA Target Date(CET)", "Closed(CET)", "Overdue By absolute", "Overdue By Srv.Hrs", "On Time"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns1",{{"Created(CET)", type datetime}, {"SLA Target Date(CET)", type datetime}, {"Closed(CET)", type datetime}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type", "Age", each [#"Closed(CET)"]-[#"Created(CET)"]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom2",{{"Age", type duration}}),
#"Filtered Rows5" = Table.SelectRows(#"Changed Type1", each [Order ID] <> null and [Order ID] <> "")
in
#"Filtered Rows5"