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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Joining does not work properly

Hello, 

 

I have 4 tables and I join them by product SKU, but when I try to create a table using Sale_AC and Inv to it does not work the way I want it. I want to see each place quantity, but it gives me total quantity for all location. I could not figure it out. Can anybody please tell me what’s wrong with it.

 

Sample.PNG

 Data base.PNG

 

 

 

 

Thank you so much 

16 REPLIES 16

Here is the link for sample pbix with dataset and join that I did

what result you are expecting? It is working as expected. it is showing Inv.Quantity for sky, you are showing line items from sales table and it is repeating inv. quantity, either you sum up your sales quantity (one row for each sku) and then it will show you correct result.

 

I don't see any issue, it is just how you are visualizing your data.

 

If you remove store name, all is fine. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Thank you for quick respond. 

 

I want to see each store that particular SKU (I have a filter for SKU to see different product and I also have a store filter too.) Performance. I want to see how many quantities sold, sales (From Sales_Ac), any transfers, on order and Inv.Qunatity which means stock on  hand for each store from Int table.

  

I have an internal tool to validate.  Per this SKU (BPCBDP000176) We have total inventory of 79 (whole company). I am looking get something similar like this. Please see below table

 

 

Store NameProducts NameSKUSold QuantitySalesOn TransferOn OrderInv.Quantity
203 TylerAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  2
301 EvansvilleAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  10
314 ChattanoogaAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176237.96  5
410 BendAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  3
702 AthensAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  0
706 West Cobb - Marietta (WC)Adopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  1
708 NorcrossAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176237.96  1
713 St. SimonsAdopted Wrap iPhone 6/6s - OLIVE/GUNMETALBPCBDP000176118.98  8
 --- so and so       
 ---       
      Total 79

 

I change all my feild to sum, but still no change. Any idea why is that. I thought something wrong with Join. Capture.PNG

 

 

 

Thank you so much 

 

 

If you look at your int table, it has only one row for SKU BPCBDP000176 with inv. quantity 79. if you want break down by store then you need to store invt. quantity by store in this table and that is what is missing.

 

I'm not sure your sure in your table below where did you get the break down of invt. quantity by store and sku. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Thank you for the respond. That might be the reason, but when I add store to the  Int table I cannot join with Sales table due duplicate values.  Do you creating another table for sku and join everything to sku will work for that?

 

Thank you so much 

create a calculate column for key by concatenating both store number  + sku in both Int and sales table and then set relation on that new calculated column, it will give you what you need.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Hello, 

 

I am so sorry to keep bothering you.  I did what exactly you said, and It gives me the same error, please see the below pictures. Do I need create another table or what will be the best solutions? 

 

Data.PNG

 

Error.PNG

 

Thank you so much 

well as message say invt table has duplicate values or there is null value. check you inventory table and value in PK



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Hello, 

 

I found what wrong with it. Yes, it has duplicates, I think I have to create a sub table. I am not sure how to achieve that. I put another detail post with example. You can see on this below link. Again, thank you so much your time and help. I appreciate it.

 

https://community.powerbi.com/t5/Desktop/How-to-create-a-sub-table-like-sub-query-on-SQL-in-Power-BI...

why your inventory table will have duplicate records, seems like there is dataset challenge than powerbi. You can surely have another table to join these together which is easy to do but I would recommend look at your invt table and make sure that you expect duplicate rows in it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

I do nto have a controll on their databases. I have a sql server analysis connection with them. Any idea How I create a sub table on using my inventory table. So I can join with other table and start working on my Week on Had report. I just want to get the store name, sku and how many transfer, on stock and on order for that store.

does the duplicate rows have same values?

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Hi, 

 

I just check it with sample data. It looks like it. 

 

Thank you 

 

if that is the case, you can remove duplicate rows in query editory and that will give the unique value for each store and sku , and it will solve all the issues.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k

 

Thank you but in the worst case scenario (for data integrity), is there any way we can write a DAX or some other method for creating a subtable by store, and sku , for that sku how many on order, on transfer, and on stock without repeating, because I only test sample data. Its huge database (Inventory), so I am kind of worrying about it, so is there any way we can do it. 

 

Thank you 

just add a step to remove duplicate, we can always revert it and see if rest everything works.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.