Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Cannot set Many to One relationship

Hi,   I've searched for answers, but I just cannot resolve this problem.  I built a model in PBI Desktop.  If you look at my 'Relationships  Oct 2022' screenshot, you'll see the relationships I set...
  • lukiz84's avatar
    3 years ago

    1) What if you load the Placement ID into a table? Before any relationships, just to check if there are really no duplicates?

     

    2) Why did you Uppercase them? They are just numbers?

  • Anonymous's avatar
    Anonymous
    3 years ago

    thank-you lukiz84 

     

    I gave up trying to do this quickly via Power BI's transform data, remove blanks, remove errors, remove duplicates commands (because they do not work in my example).

     

    Instead, I went back into my source data, the build sheet Excel, used conditional formatting to highlight duplicates and I manually removed duplicates, one by one.  Then next, removed blanks.  Cleaned my source data the slow way.  I had hoped PBI would deal with this quickly for me.

     

    Later, my co worker tells me that in PBI Power Query, the remove duplicates query worked for him.  It is the 'Remove Blank rows' query that doesn't work. He said quick workaround is to select the unique ID's column, hit the drop down selector on the header, now simply untick blanks to filter them out.  It was that simple!  Worked for him, then you are able to move on and set that many-to-One relationship between tables.

     

    oh and you asked why I made it UPPER CASE. All my Id's are already in Text format; that's how they appear in the source data.  I made them UPPER CASE in PBI just to ensure all ID columns in all the tables are the same format.