Source |
|
|
|
|
Result |
|
|
|
ColumnA |
ColumnB |
Data1 |
Data2 |
|
ColumnA |
NotMatchB |
Data1 |
Data2 |
USNTS |
USNTS |
ABC |
123 |
|
USNTS |
USSPZ |
ABC |
123 |
USNTS |
USSPZ |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USNTS |
USLVV |
ABC |
123 |
USNTS |
USLVV |
ABC |
123 |
|
USLVV |
USNYC |
ABC |
123 |
USMSY |
USMSY |
ABC |
123 |
|
|
|
|
|
USHOU |
USHOU |
ABC |
123 |
|
|
|
|
|
USMSY |
USMSY |
ABC |
123 |
|
|
|
|
|
USMSY |
USMSY |
ABC |
123 |
|
|
|
|
|
USLVV |
USNYC |
ABC |
123 |
|
|
|
|
|
USNYC |
USNYC |
ABC |
123 |
|
|
|
|
|
Code:
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Diff = Table.AddColumn(Source, "NotMatchB", each List.Difference({[ColumnB]},{[ColumnA]})),
Expand = Table.ExpandListColumn(Diff, "NotMatchB"),
Filter = Table.SelectRows(Expand, each ([NotMatchB] <> null)),
TSC = Table.SelectColumns(Filter,{"ColumnA", "NotMatchB", "Data1", "Data2"})
in
TSC
Bookmarks