Forum Discussion
"Many-to-Many" Error when mapping relationship between tables
- 6 years ago
Hi DataZoe . Thank you for your suggestions. I worked through all the steps listed in Query Settings. I found the relationship acutally worked up until the step of "Unpivot Other Columns." I redid this step using "Unpivot only selected columns"... for whatever reasons (which is quite beyond me)... the relationship now works. If someone else gets a similar problem... I'm not quite sure if this solution will be repeatable. Anyhow. There it was. Thanks for your suggestions though, I've made a mental note in case this happens to me again.
Cheers! Michelle
michellepace - Sometimes "unique" is different between Power Query and DAX (often involves upper and lower case characters). That may be the issue. Hard to say though.
You could try creating a bridge table like this:
Table = DISTINCT(UNION(SELECTCOLUMNS('Table1',"Column",[Column1]),SELECTCOLUMNS('Table2',"Column",[Column2])))
- michellepace6 years ago
Resolver III
Hi Greg_Deckler . Thank you for your reply. I am matching on a numeric field. There is no upper and lower case. Also, it works as expected if I export the data to excel and reimport from there. Surely Power Bi can't be so fickle? I must be doing something wrong?
- Greg_Deckler6 years ago
Community Champion
michellepace - Well, there are digits in there but those fields are not true numeric fields. They are text fields that contain numbers. Try doing Clean and Trim operations on the columns in both tables. There may be some spaces at the beginning/end and other such things that are causing issues.