Forum Discussion
Power BI relationship not working
Okay I got your point.
But how to calculate the contractors for each projectId?
Does the fact table have contractor id? What columns did you use to connector contractor and fact?
- maheshwarineha2 years agoFrequent Visitor
Table 1 - projects - contains id
Table 2 - projectcontractors - contains left id and right id
left id is connected with projects id and right id is connected with contractors id
Table 3 - contractors - contains id
projects are connected to projectcontractors - one to many
projectcontractors are connected to contractors - many to one
- danextian2 years ago
Super User
Is one contractor id equivalent to one right id in table2? If so you can use a distinct count on table 2 right id. Otherwise, you can create a calculated column in table2 (RELATED(contractors[contractorid]) and do a distinctcount on that calculated column.