8 Replies Latest reply on Oct 27, 2017 10:06 AM by Mark Bradbourne

# Identify Duplicates with Calculated Fields

Here the example:

NameIs Name mentioned more than once?
MaryYes
GeorgeYes
AnthonyNo or Null
MaryYes
MaryYes
GeorgeYes
BillNo or Null
• ###### 1. Re: Identify Duplicates with Calculated Fields

Try this LOD

IF { FIXED [Name] : SUM([Number of Records]) } > 1 Then "Yes"

Else "No"

END

• ###### 2. Re: Identify Duplicates with Calculated Fields

Hi Mark,

thanks for the reply.

The LOD is "valid". However, it returns "Null" only.

• ###### 3. Re: Identify Duplicates with Calculated Fields

It sounds like a mission for LOOKUP

Something like:

IF NAME = LOOKUP([NAME]),-1

THEN PREVIOUS_VALUE(1)+1

ELSE 1

END

Have a look at this thread, it's an interesting guide about how to do this: How to identify duplicates

If you need more assistance, let me know

----------

Lénaïc RIÉDINGER, Global Community Engineer Tableau

If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!

• ###### 4. Re: Identify Duplicates with Calculated Fields

Hi Lenaic,

actually, I am looking for sth. like the the LOD Mark suggested:

Not sure why it returns "Null".

Thank You.

• ###### 5. Re: Identify Duplicates with Calculated Fields

Thanks

Deepak

• ###### 6. Re: Identify Duplicates with Calculated Fields

Thank you. You also have "Null" in the Data Set. However, I Need the "Yes" and "No" in the data set as I would like to do further Operations in that calculated field.

• ###### 7. Re: Identify Duplicates with Calculated Fields

Where Do you See Null Here??

• ###### 8. Re: Identify Duplicates with Calculated Fields

Add a Null check (try this)

IF ISNULL({ FIXED [Name] : SUM([Number of Records]) }) Then 'No'

ElseIF { FIXED [Name] : SUM([Number of Records]) } > 1 Then "Yes"

Else "No"

END