Forum Discussion
Anonymous
4 years agoNot applicable
Filter table by values not contained in a list
Hi! I have the following script in M : let Source = Sql.Database("17x.Xx.xx.x", "XXX", [Query = "SELECT TOP 100#(lf)YEARWEEK_DATE,#(lf)YEARMONTH_DATE,#(lf)CONVERT(date, CONVERT(varchar(8), (year...
Anonymous
4 years agoNot applicable
Using the List.Difference(CurrentHistory,ListaDistintos) function probably solves your problem.
If you don't know how to adapt it to your case, publish a table with your data (even fake ones) and explain in detail what you want to achieve
let
ListaDistintos = {202204, 202201, 20211},
CurrentHistory ={202204, 202203, 202202, 202201, 202112, 20211},
History=List.Difference(CurrentHistory,ListaDistintos)
in
History