Marco Onnis
Marco Onnis

Reputation: 25

Power BI can't determine relationship, specific case study

I'm writing to ask your help for a well known problem in data modelling, but in this specific case apparently all the solutions I've found don't work (or cannot be applied).

I have a model like this one in the picmodel

the key fields are the IDs; the data behind is related to a list of unique subjects that can have multiple roles and at the same time can have multiple relations (with other subject that are defined as "linked subjects" and are for examples relatives, friends and so on).

Clearly this is only a sample model but in this case I was able to reproduce the situation and the error: I need to have a visual Table with few fields from all the three tables. Of course when I add together the fields from "Relazioni" and "Ruoli" I got the error Can't display the data because Power BI can't determine the relationship between two or more fields. I need to add some slicer from all the tables, so that I can filter for a specific relation and retrieve the subject (that's why I've used both-way relationships).

Conceptually, there's no much sense in connecting Roles ("Ruoli") and Relations ("Relazioni") but in SQL I've written a simple query with "Soggetti" in LEFT JOIN with the other two tables and I got he data I want: a list in which the Subject is repeted for every role and every related subject.

I'm not sure about what is the problem... and if there is an easy solution.

What do you think can be a intelligent approach?

thanks in advance!

Upvotes: 0

Views: 62

Answers (0)

Related Questions