Primary KEY not working as expected (Many To Many)

Hi there,

I have a dim table Store_Info with Store column which has to point to fact tables Monthly_Inventory and MB52_Counting_Basis based on Store. See below screenshots displaying Many to many (:) relationship type.


I have checked and haven NO duplicates, hence valid primary keys within table Store_Info so I don’t really understand why is it giving me this sort of relationship that I want to avoid (of course I would like to have One to many beinf Store_Info the table that filters both factual tables).

Any support here will be highly appreciated.

Thanks a lot
Inventory Management Control.pbix (1.3 MB)

Hi @SamSPAIN,

Your Store_Info table has a null, returning (blank)
image

…and your fact tables have an “empty string” value which is not equal to null
image

This mismatch is forcing the M:M

I hope this is helpful

5 Likes

Many to Many is a big ask of Power BI. Is there a chance to join these two tables in Power Query.

I looked at the model and am wondering if there are any columns you can concatenate to make the store table unique. I don’t think another store bridge table will work but you could try that as well.

Thank you @Melissa - found what was causing this issue… somehow there was a type of connection problem since in the factual table I replaced (Blank) with a string which was not appearing visible in PQ… never before faced this. Closed everything, restarted and is working just as expected. Much appreciated for your support.

So my question is how did you get the same table to have two active relationships to two separate tables? I try to do that and it won’t allow me to. I have a couple different fact tables that I can’t combine but they both have a column that are the same (facility name).

I want to be able to filter both off the facility name utilizing one filter but it doesn’t work. And it won’t let me create two relationships from a created table of facility names.

Hi @NukeNDO

Please start a new topic as this topic has been solved. Member will likely not see your message on solved topics. You will get better results starting a new topic. Also provide your power bi files and any other files with mock up final how your data will look.

Thanks
Keith