Forum Discussion
Anonymous
9 years agoNot applicable
Identify duplicates and show up records
I've got contact table with columns: names, emails. I want to identify duplicates in emails and show up their names. for example, show me the table like this. any ideas, thanks.
- Anonymous9 years ago
You could create a calculated column with the following formula:
Count Emails = Var Emails = [Emails] RETURN CALCULATE( COUNTROWS('Your Table'), all('Your Table'), 'Your Table'[Emails] = Emails )From here, you could simply look for any rows where the Count Emails is greater than 1.
rogerdea
Helper IV
7 years agoThis works great for me. How would i amend this to only perform the duplicate check for the year a record is related to?
Anonymous
7 years agoNot applicable
I'll have to make some assumptions about your data but it could be something like:
Count Emails =
Var Emails = [Emails]
Var YearVal = YEAR([EmailDate])
RETURN
CALCULATE(
COUNTROWS('Your Table'),
all('Your Table'),
'Your Table'[Emails] = Emails,
'Your Table'[EmailDate] => DATE(YearVal, 1, 1),
'Your Table'[EmailDate] <= DATE(YearVal, 12, 31)
)- Anonymous5 years agoNot applicable
Hello all,
The suggested solution works perfectly, However, in my case I need to count how many times a certain value has appear so if it appears 3 time I need to get an output for each of those 3 lines like 1 or 2 or 3 by descending order.... Anyone can suggest??
Thanks in advance
- inavedk4 years agoFrequent Visitor
Hi you can do this in M query add both line of code individually in your steps.
= Table.Group(#"Previous Step", {"Column_name"}, {{"Tablewithindex", each Table.AddIndexColumn(_,"Running Total",1,1), Int64.Type}}) = Table.Combine(#"Grouped Rows"[Tablewithindex])