How do I remove duplicate row in leaderboard

Here’s a reasoning:

  • Imagine a list of elements, terms for example. This list has repetitions. We want to identify the unique list.
  • Now take one term. Imagine that in your table the font of this term is colored, and each duplicate has a different color: red, orange, yellow, green, etc.
  • Create a relation of the terms onto themselves. If multi, red will point to all colors, orange will point to all colors, and so on. If single, the relation will point to the first occurrence, so red will point to red, orange will point to red, yellow will point to red, and so on.
  • If color is the same (red-red), return “true” (= this is the
    first occurrence of the term). If color is different (red-orange or red-yellow …), return “false” (= this is not the first occurrence of the term).
  • The rows with true will give you the unique list.
  • Now instead of comparing font color, imagine comparing a TermID which would be unique to each term (just like the unique color). This is exactly the RowID.

EDIT: To be perfectly rigorous, what we are doing here is identifying, within a list of elements with duplicates, the first occurrence of each element. This list happens to be unique.

In the layout editor, one displays the entire list/collection with its duplicates, then in the filter options, one asks to only display the first occurrence of each element (the rows with the true values). This gives us the unique list of elements.

3 Likes