Forum Discussion

Oros's avatar
Oros
Post Prodigy
2 years ago
Solved

Finding duplicates

Hello,   I have 2 tables that show locations for each product.  I have a result table that put together the locations. What should be the correct measure or column to identify (and count) duplicat...
  • Zang_Mi's avatar
    2 years ago

    Hello,

     

    The correct way to put together the data from the two tables, is to use Append Queries option to get a table like the following (with two repeated rows to remove):

    ProductLocation
    Product A200-A1
    Product A200-A2
    Product B400-A1
    Product A200-A1
    Product B400-A1

     

    Then you can just apply Remove Duplicates on the table.

     

    Regards

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Oros ,

    Thanks Zang_Mi  for sharing, here are some suggestions, I hope they can be helpful to you.


    1. Create a measure to count products, and mark products greater than or equal to 2 as 1.

    Measure =
    VAR _cou = CALCULATE(COUNT(result[Product]),FILTER(ALL(result),'result'[Product] = MAX('result'[Product])))
    RETURN
    IF(_cou >= 2,1,0)

    2. Click the small arrow next to the product field to set conditional formatting for its background color.

     

    3. The final result is shown in the figure below.

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.