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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Duplicates of 'Art nr' and....!

Hi everyone,

I need your expertise on this specific matter which I am not entirely sure myself how to solve right now. 
I have a column with 'Article Numbers' (we are talking thousands of them) then I have another column 'Warehouse' which states which warehouse the article is connected to. Worth noting is that we have 2 warehouses.

 

I first want to check for whether there are duplicates in 'Article nr' and then a formula (I guess?) that checks whether the duplicates considers which Warehouse it is connected to.
More specifically, because, if there is a duplicate for an article, one of the duplicates could be written on one of the Warehouse and the other on the other warehouse, if you see what I mean.
For ex;

 

Article nr: '123456' 
Warehouse: 'A', 'B'.


If there are two Art nr of '123456' existing, it could be that one of them is written on Warehouse A and the other one on Warehouse B. Whereareas I only want it to display '123456' for one of the warehouses.

My issue now then is how I go on solving this.
I was first thinking of removing duplicates in 'Power Query' but as the 'Art nr' could be written on either 'A' OR 'B', something tells me that, that's not how to solve it.

 

Hope you can help me in this.

Many thanks!!  

1 ACCEPTED SOLUTION

Hi @Anonymous 
Please let me know if you still have any question

1.png2.png3.png

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

@tamerj1 

To display the duplicates and which warehouse they belong to.

Hi @Anonymous 
Apologies for the late reply. I got destracted with some other business. If I correctly understand then this is a simple requirement. Just create a matrix visual with Art No on rows and Warehouse on columns and this measure on values 

 

Duplicate = 
SUMX ( 
    VALUES ( Warehouses[Art Nr] ),
    COUNTROWS ( VALUES ( Warehouses[Warehouse] ) )
)

 

From the filter pane do the following

1.png

2.png

Anonymous
Not applicable

@tamerj1 No worries. Thanks for your reply.

Do you add the measure to the matrix? And if so, is it possible to delete the duplicates? (as I just like we did know first only want see how many duplicates there are and then delete each duplicate for either Warehouse A or B as it's only necessary for the 'Art nr' to be written on of the Warehouses.

 

Many thanks again!

HI @Anonymous 
You can just create a new table as follows
1.png

Warehouses No Duplicates = 
SUMMARIZE ( Warehouses, Warehouses[Art Nr], "Warehouse", MAX ( Warehouses[Warehouse] ) )
Anonymous
Not applicable

@tamerj1 
Do you drag the measure to the table or? And does the measure takes the duplicates into consideration. If not how can I delete those?

Many thanks again.

Hi @Anonymous 
Please let me know if you still have any question

1.png2.png3.png

Anonymous
Not applicable

Hi @tamerj1,

Absolutely, here comes. I have 'bolded' the two articles that are duplicated but has different Warehouses. That's the thing with my file, there are thousands of rows.
Therefore, I want in my Power BI, to find all the duplicates and see which/how many are written on Warehouse A and how many on B.

 

Art NrWarehouse

4768

A
4452A

6325

B

9562

A

8515

B
9845B
6650B
1165B
7662A
9563A
3465B
9531A

6156

B
7513A
7346B
9512A
2563A
4561B
6325A
1637B
4768B

 

Many thanks!!

 

@Anonymous 

Thank you. What is the expected result based on same sample data?

tamerj1
Super User
Super User

Hi @Anonymous 

I like this type of problems. Would you please create some dummy sample data and share it along with the expected results? Thank you

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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