Highlight duplicates in a column using a conditional format

#1

Quick little conditional format that I often use to find the duplicates in a table -

The formula I have used here is
Table.Filter(Column.Contains(thisrow.Column).Count() >1

10 Likes

Allow only unique value in a column
#2

Nice @mallika! I definitely use this all the time for deduping (but usually put this into the filter directly so I have only the remaining results that need to be scrubbed; filter ends up being lookup([thistable], Name, thisrow.Name).count() >1.

1 Like

#3

The real question is what in the world are you making that requires that much Absinthe?

3 Likes

#4

Wouldn’t you like to know :smiley:
-spending the weekend working on sanitized examples-

0 Likes

#5

The good news is I’m pretty sure most alcohols can be used as antibacterials

2 Likes

#6

wondering if you can expand on this…

I’m trying to do this as a formula in the document that counts all the different names that are list more than once.

I can’t quite figure it out… can it be done @mallika?

0 Likes

#7

Hi Tom, sorry I was traveling for a bit. Did you figure this one out?

0 Likes

#8

sure didn’t! have been working on other things! If you have any insight that would be great though! hope you had an awesome trip :slight_smile:

0 Likes

#9

The formula above should work for you - give you the number of times a a name has been listed and you can filter to remove the ones that are less than 1. Or use the filter Evan used.
However, I am happy to take a look at your particular document - share it with support@coda.io or mallika@coda.io and I can take a look.

(I did have a wonderful time traveling and am back ready to look at docs and more docs! )

0 Likes

#10

Maybe because of some changes in Coda, I think there a couple things to update about this:

  • missing a close bracket here after “thisrow.Column)”
  • when trying to use this formula in my doc, it keeps autocorrecting out the “thisrow.”, and works without it

The new formula should read:
Table.Filter(Column.Contains(Column)).Count()>1

@mallika would mind updating the original post for others’ later reference?

1 Like

#11

Thank you that was great help! It works for me but with a quirk.

I’d like to add some more detail for others that might come across this situation.
Seems like Table.Column and thisRow.Column are shown in the same way currently in Coda. But you have to make sure that you choose the correct version.

thisRow.Column for the first instance
image

And Table.Column for the second instance
image

1 Like

#12

How would I tweak this to only highlight duplicates within the same group?

0 Likes