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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Oros
Post Prodigy
Post Prodigy

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

Anonymous
Not applicable

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
Anonymous
Not applicable

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.