sandy666
05-22-2020, 12:49 PM
Distinct vs Unique
SourceUniqueDistinct
List_____List_____List
MarkMikeMark
JohnAdamJohn
MikeJoeMike
AdamChrisAdam
JohnJoe
MarkChris
Mark
Joe
Chris
Unique
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Group = Table.Group(Source, {"List"}, {{"Count", each Table.RowCount(_), type number}}),
Filter = Table.SelectRows(Group, each ([Count] = 1)),
Unique = Table.RemoveColumns(Filter,{"Count"})
in
Unique
Distinct
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Group = Table.Group(Source, {"List"}, {{"Count", each Table.RowCount(_), type number}}),
Distinct = Table.RemoveColumns(Group,{"Count"})
in
Distinct
SourceUniqueDistinct
List_____List_____List
MarkMikeMark
JohnAdamJohn
MikeJoeMike
AdamChrisAdam
JohnJoe
MarkChris
Mark
Joe
Chris
Unique
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Group = Table.Group(Source, {"List"}, {{"Count", each Table.RowCount(_), type number}}),
Filter = Table.SelectRows(Group, each ([Count] = 1)),
Unique = Table.RemoveColumns(Filter,{"Count"})
in
Unique
Distinct
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Group = Table.Group(Source, {"List"}, {{"Count", each Table.RowCount(_), type number}}),
Distinct = Table.RemoveColumns(Group,{"Count"})
in
Distinct