Forum Discussion
Cannot create relationship between one calculated table and two tables from Power BI dataset
Hi,
I have trouble creating a relationship.
I have 2 fact tables from the same data source (a Power BI dataset).
I also have one dimension table, which is a calculated table joining (with UNION()) select columns from three tables. Two of the tables come from the same data source as the fact tables. The third one comes from a different Power BI dataset.
dim_products_append =
var table1 = SELECTCOLUMNS(dim_products, "ProductID", dim_products[ProductID], "Brandname", dim_products[Brandname])
var table2 = SELECTCOLUMNS(dim_dropship_pipeline, "ProductID", dim_dropship_pipeline[ProductID], "Brandname", dim_dropship_pipeline[Brand])
var table3 = SELECTCOLUMNS(dim_tool_pipeline, "ProductID", dim_tool_pipeline[ProductID], "Brandname", dim_tool_pipeline[Brand])
return union(table1, table2, table3)
If would like to create relationships from the dim table to the fact tables between ProductID for one of the fact tables, and Brand/Brandname for the other.
I'm only able to create one though. When I try to create the other I get a message that a relationship already exists outside of the data source. I don't understand how that's possible.
I'm the one who made the Power BI dataset with the fact tables and I can confirm that there are no relationships between fact_dropship_pipeline and fact_tool_pipeline. Could it have something to do with my dim_products_append definition?
I hope someone has a solution 🤓
Hi Anonymous ,
If I understand it rigth you have a Dataset based on two other Datasets or a otherDataset and another source?
It's not possible to have more than one relationship in Composite Models between other Datasets (sources).
You can put all the Datasources in one Dataset and connect them there but otherwise I gues this won't work. If I understand your problem right :).
Best,
Kathrin
If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!
3 Replies
- KBOMemorable Member
Hi Anonymous ,
If its a composite model you have some limitations.
Take a look here: https://docs.microsoft.com/power-bi/transform-model/desktop-composite-models
Best, Kathrin
If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!- AnonymousNot applicable
Hi Kathrin,
Thanks for the reply. I took a look and I don't think it says anywhere that I shouldn't be able to create the relationship, or have I just missed it?
- KBOMemorable Member
Hi Anonymous ,
If I understand it rigth you have a Dataset based on two other Datasets or a otherDataset and another source?
It's not possible to have more than one relationship in Composite Models between other Datasets (sources).
You can put all the Datasources in one Dataset and connect them there but otherwise I gues this won't work. If I understand your problem right :).
Best,
Kathrin
If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!