1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
let
Source = Excel.CurrentWorkbook(){[Name="Tableau1"]}[Content],
#"Type modifié" = Table.TransformColumnTypes(Source,{{"Groupe", Int64.Type}, {"data", type number}}),
#"Index ajouté" = Table.AddIndexColumn(#"Type modifié", "Index", 1, 1, Int64.Type),
#"Index ajouté1" = Table.AddIndexColumn(#"Index ajouté", "Index.1", 0, 1, Int64.Type),
#"Requêtes fusionnées1" = Table.NestedJoin(#"Index ajouté1", {"Index.1"}, #"Index ajouté1", {"Index"}, "Index ajouté1", JoinKind.LeftOuter),
#"Index ajouté1 développé" = Table.ExpandTableColumn(#"Requêtes fusionnées1", "Index ajouté1", {"data"}, {"Index ajouté1.data"}),
#"Lignes triées" = Table.Sort(#"Index ajouté1 développé",{{"Index", Order.Ascending}}),
#"Personnalisée ajoutée" = Table.AddColumn(#"Lignes triées", "Moving Range", each [Index ajouté1.data]-[data]),
#"Colonnes supprimées1" = Table.RemoveColumns(#"Personnalisée ajoutée",{"Index", "Index.1", "Index ajouté1.data"}),
#"Type modifié1" = Table.TransformColumnTypes(#"Colonnes supprimées1",{{"Moving Range", type number}}),
Arrondi = Table.TransformColumns(#"Type modifié1",{{"Moving Range", each Number.Round(_, 2), type number}})
in
Arrondi |
Partager