Forum Discussion

Anmolgan's avatar
Anmolgan
Post Prodigy
6 years ago

Eliminate Many 2 Many Relationship

Hi,

 

I am facing the issue while building many 2 many relationship, so far it works well when I want to display sales vs actual as per month, location, but when it comes down to customer codes, I am having problems, many 2 many realtionship is creating cross joins between multiple reocrds, for example below screenshot.

 

Dealer code ABD35926 I should only have 1 entry that says "RATNAPRABHA AUTO AGENCIES", but in PowerBi it shows various entries that is a product of cross join, how can I eliminate this so that I can only have 1 single entry as per each unique dealer code?

10 Replies

  • mussaenda's avatar
    mussaenda
    Community Champion

    You need to create a unique column to make them one to many.

     

    You can concatenate columns which will make them unique then you can eliminate many to many relationship

  • Anmolgan , Screenshot missing. But if there is more than one name. You can go in edit query/Data transformation, right-click on column and delete duplicate values 

     

    Or create a new table

    summarize(Table, table[ID],"Name", max(Table[Name]))

    • Anmolgan's avatar
      Anmolgan
      Post Prodigy

      Hi amitchandak can you help me resolving the issue, I will share you the pbix, let me know if it will be possible for you to look into this