Forum Discussion
Joining does not work properly
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.
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?
Thank you so much
- parry2k8 years agoSuper User
well as message say invt table has duplicate values or there is null value. check you inventory table and value in PK
- dananjayaprasad8 years agoHelper I
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.
- parry2k8 years agoSuper User
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.
- dananjayaprasad8 years agoHelper I
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.
- parry2k8 years agoSuper User
does the duplicate rows have same values?
- dananjayaprasad8 years agoHelper I
- parry2k8 years agoSuper User
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.
- dananjayaprasad8 years agoHelper I
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
- parry2k8 years agoSuper User
just add a step to remove duplicate, we can always revert it and see if rest everything works.