1 2 3 4 5 6 7 8 9 10 11 12
| let Source = Excel.CurrentWorkbook(),
#"TabChevaux" = Source{[Name="TabChevaux"]}[Content],
#"TabOpérations" = Source{[Name="TabOpérations"]}[Content],
#"TabOpModifiée" = Table.TransformColumnTypes(TabOpérations,{{"Date", type date}, {"Libellé", type text}, {"Code", type text}, {"Montant", Int64.Type}}),
#"ColVerifCheval" = Table.AddColumn(#"TabOpModifiée", "VerifCheval", each List.Transform(#"TabChevaux"
[Liste chevaux] , (x) => Text.Contains([Libellé], x) )),
#"ColFindCheval" = Table.AddColumn(#"ColVerifCheval", "Contient_cheval", each List.AnyTrue([VerifCheval]) ),
#"ColCheval" = Table.AddColumn(#"ColFindCheval", "Cheval", each try #"TabChevaux" {List.PositionOf([VerifCheval], true)}
[Liste chevaux] otherwise null),
#"Colonnes supprimées" = Table.RemoveColumns(ColCheval,{"VerifCheval", "Contient_cheval"})
in
#"Colonnes supprimées" |
Partager