Bonjour,
Je débute encore avec PQ, mais la solution ci-jointe fonctionne. J'ai utilisé 2 plages nommées pour vos 2 critères, et il suffit d'actualiser la requete pour mettre à jour le résultat.
Le code M de la requête :
let
filtreSrc = Excel.CurrentWorkbook(){[Name="srcPQ"]}[Content]{0}[Column1],
filtreEsp = Excel.CurrentWorkbook(){[Name="espPQ"]}[Content]{0}[Column1],
Source = Excel.CurrentWorkbook(){[Name="BDD"]}[Content],
srcType = Table.TransformColumnTypes(Source,{{"Source", Int64.Type}, {"ID produit", type text}, {"Espèce principale", type text}, {"€ client 1", Int64.Type}, {"Client 1", type text}, {"€ client 2", Int64.Type}, {"Client 2", type text}, {"€ client 3", Int64.Type}, {"Client 3", type text}, {"€ client 4", Int64.Type}, {"Client 4", type text}, {"€ client 5", Int64.Type}, {"Client 5", type text}, {"€ client 6", Int64.Type}, {"Client 6", type text}}),
filtre = Table.SelectRows(srcType, each ([Source] = filtreSrc) and ([Espèce principale] = filtreEsp)),
colsCli = Table.SelectColumns(filtre,
{"Client 1", "Client 2", "Client 3", "Client 4", "Client 5", "Client 6"}
),
toList = List.Combine(Table.ToColumns(colsCli)),
res = List.RemoveNulls(List.Distinct(toList))
in
res
Le fichier joint
EDIT : Salut @JFL pris de vitesse