let
Source = Table.SelectRows(Excel.CurrentWorkbook(), each Text.StartsWith([Name], "Tableau")),
a = {Table.ColumnNames(Source[Content]{0})} & {List.Transform(Source[Name], each _ & "_Qté")},
b = Table.Group(Table.ExpandTableColumn(Source, "Content", a{0}), a{0}{0}, {{"x", each
let x = Table.ToColumns(Table.Group(_, "Name", {"y", each List.Sum([Quantité])}))
in Table.RenameColumns(Table.FromRows({x{1}}, x{0}), List.Zip ({x{0}, List.Transform(x{0}, each _ & "_Qté")}))},
{"Total_Quantité", each List.Sum([Quantité])}, {"Total_Longueur", each List.Sum([Longueur])}}),
Result = Table.ExpandTableColumn(b, "x", a{1})
in
Result