Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Oros
Resolver III
Resolver III

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) duplicate records in the result table?  Thanks.

 

Oros_0-1711625335609.png

 

2 ACCEPTED SOLUTIONS
Zang_Mi
Resolver II
Resolver II

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.

Zang_Mi_0-1711635492355.png

 

Regards

View solution in original post

v-kaiyue-msft
Community Support
Community Support

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.

vkaiyuemsft_0-1711697771543.png

 

vkaiyuemsft_1-1711697771544.png

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

vkaiyuemsft_2-1711697785755.png

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.

View solution in original post

3 REPLIES 3
v-kaiyue-msft
Community Support
Community Support

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.

vkaiyuemsft_0-1711697771543.png

 

vkaiyuemsft_1-1711697771544.png

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

vkaiyuemsft_2-1711697785755.png

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.

Zang_Mi
Resolver II
Resolver II

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.

Zang_Mi_0-1711635492355.png

 

Regards

hI @Zang_Mi,

 

Thank you for your reply.  The only thing is that I would like to show (highlight) on the table the duplicates.  Is it possible to highlight those duplicate records showing on the result table?  Thanks again.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.