Forum Discussion
Anonymous
6 years agoNot applicable
Check duplicate in another table
Hello guys, I'm trying to create a custom column in my 'investigation' table. I want that this new column tells me if there are some duplicates ERP number in my 'source' table matching with ERP n...
- 6 years ago
See this formula:
#"Add Duplicate Check" = Table.AddColumn( #"Changed Type", "Duplicate Check", each let varCode = [Code], varColor = [Color] in if Table.RowCount( Table.SelectRows( #"Source Table", each [Code] = varCode and [Color] = varColor ) ) > 1 then true else false, type logical )My PBIX file is here. It looks in this table:
and finds duplicates as shown:
Anonymous
6 years agoNot applicable
My bad, i can't provide pbix file for now but maybe with this schema, it will be more precise :
Thank you very much !
edhans
6 years agoCommunity Champion
See this formula:
#"Add Duplicate Check" =
Table.AddColumn(
#"Changed Type",
"Duplicate Check",
each
let
varCode = [Code],
varColor = [Color]
in
if Table.RowCount(
Table.SelectRows(
#"Source Table", each [Code] = varCode and [Color] = varColor
)
) > 1
then true
else false,
type logical
)
My PBIX file is here. It looks in this table:
and finds duplicates as shown:
- Anonymous6 years agoNot applicable
Thanks a lot, it worked like a charm !
- edhans6 years agoCommunity Champion
Great Anonymous . Glad to help out.