Identifying duplicate results in a column

Hi Looker Community,

I’m currently looking for a way to identify if results contain any duplicates in a specific column. Can I use a table calculation to identify column duplicates? I’m looking more for a way to say yes/no rather than count the distinct total.

Thanks!

1 5 5,620
5 REPLIES 5

Try this table calculation:

if(
   count(${order_items.order_id})
   - match(${order_items.order_id}, offset(${order_items.order_id}, count(${order_items.order_id})
   - row() * 2 + 1))
   + 2 - match(${order_items.order_id}, ${order_items.order_id}) > 1
   ,"Duplicate"
   ,null
)

You should have the following behavior:

Hey Cyril - thanks so much this will do exactly what I’m looking to accomplish. Appreciate the guidance!

-Nick

Is there an easy way to filter the report to only show the Duplicate records?

awseome  Cyril_MTL_Analytics !!! it works just fine!

Thank you so much @Cyril_MTL_Analy !

Top Labels in this Space
Top Solution Authors