Forum Discussion
Filter direction isn't valid for this relationship
I´m having the same problem and it doesn´t work. The columns types are exactly the same, but it is imposible to create the relation. Moreover, it let me create the relation with another columns with different types (numbers, string, dates...).
I think this is an error.
It would be find that Power BI shows more detail in that type of errors, because many times it´s almost immposible work with this tool.
JorgeDiegomjohannessonv-ljerr-msftankitpatira
I just ran into this bizzare behavior yesterday/today. Using Direct Query against a SQL database. There were 3 records in one table that matched 3 records in another with additional metadata. For the life of me I couldn't figure out why this was error happening. I ended up re-creating the tables as just heaps and STILL saw the same behaviour... The values being compared didn't matter, I tried to pull in different columns, remove all values except the 2 relationship columns, and many other database side things and still, nothing worked.
Changing any of the fields (Cardinality, filter direction, etc, etc in the "Edit Relationship" pop up has no effect and you can't select "OK".
So I was unable to resolve or re-produce the issue, but I did stumble upon a solution that worked - although I have no idea why.
When the Edit Relationship pop up appears with the relationship error and the "OK" button is still grayed out... Just hit "Enter", and the relationship is created.
You then have the same ability to edit it, change the direction, etc, etc. and the relationship works as expected.
What if you delete the relationship, and try to re-create it? - You get the same warning message and the inability to create it. Hit "Enter" on the edit relationship pop up, and it gets created.
Summary:
I have no idea why this is happening, and I can't recreate a scenerio where I can consistently get the pop up. My only guess is that it is something in the data based on all the checks I've done and testing around different objects and data access methods. Until I can repeat it, I won't file it as an issue, but hopefully if someone encounters this again hitting "Enter" on the Edit Relationships screen with the error will create the relationship as it did for me. At least that part was repeateable!
Ironically, if I import this same data set instead of direct query it - Power BI creates the exact same relationship automatically for me.
Hope this works/helps someone else.
- Anonymous9 years agoNot applicable
I believe there is an element of this in an issue I am facing - http://community.powerbi.com/t5/Desktop/splitting-one-table-into-two-relationships-don-t-work/m-p/108280#U108280
- mhotek9 years ago
Advocate I
Had this precise issue. What I have is a 1:1 relationship. There is no mismatch. There is exactly 1 row in the "parent" for each row in the child. No matter what I do, I get this error. If I just slam the Enter key, it creates the relationship, even though the OK button is greyed out. I can then open the relationship back up and not only is it created, it has zero problem recognizing it, produces no errors, and the OK button is enabled.