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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Oros
Post Partisan
Post Partisan

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.