Hi Guys,
i have 2 lists:
List
1 |
2 |
3 |
List
1 |
2 |
3 |
4 |
and now i want to get difference between them.
I tried with List.Difference but it is not working:
I should get result "4" as list (i want to use this in Table.RemoveColumns property) but i am getting empty List with query:
let
Source = List.Difference(Table1,Table13)
in
Source
Why?
Please help,
Jacek
Why?
Short answer: because you do not read the documentation: https://docs.microsoft.com/en-us/powerquery-m/list-difference
It clearly says: Returns the items in list list1 that do not appear in list list2
In english, list1 should be the longer list that might have items not in list2.
In your case, just change the position of the lists:
= List.Difference(Table13,Table1)
Thank you very much!
It is awesome!
Jacek