Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
truttafisker
Helper I
Helper I

Help with data model and relationships

Hi there

I have a problem with ambigious relationship .. and I can't figure how to fix this .. so I hope that someone out there could guide me in the right direction.

in the picture you can see an overlook of the model and the relationship, but I need a relationship between the Date-table and PriceList line (the blue/red dotted line) .. 

But when I add the relationship between these two tables, I'm told it's ambigiously .. 

Are there anyone who have an idea on how to solve this ?

IMG_5824.HEIC.png

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

This looks to me like a relational database schema. My advice is to flatten this into a star schema as best you can.  Eg, the bonus entry tables look like they could be flattened. I also suggest appending the invoice header and credit header into a single table.  Just add a new column to identify each as invoice or credit. Same for the details. 

I can see that you have a pricing table. I suggest you consider writing the data during ETL into the transaction tables. From what I can see, you are storing the "prices" in the model. A different approach would be to write/store the price against the transaction during data load. If you can do this, everything would be a lot easier.

 

if you make these changes, I think the problem goes away. What you need to know is that relationships in PBI re actually "instructions" for the model to propagate filters between tables. If there is more than one path for filter propagation between tables, then "ambiguity" sets in. By flattening and simplifying the model during load, you can make it work. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

5 REPLIES 5
MattAllington
Community Champion
Community Champion

This looks to me like a relational database schema. My advice is to flatten this into a star schema as best you can.  Eg, the bonus entry tables look like they could be flattened. I also suggest appending the invoice header and credit header into a single table.  Just add a new column to identify each as invoice or credit. Same for the details. 

I can see that you have a pricing table. I suggest you consider writing the data during ETL into the transaction tables. From what I can see, you are storing the "prices" in the model. A different approach would be to write/store the price against the transaction during data load. If you can do this, everything would be a lot easier.

 

if you make these changes, I think the problem goes away. What you need to know is that relationships in PBI re actually "instructions" for the model to propagate filters between tables. If there is more than one path for filter propagation between tables, then "ambiguity" sets in. By flattening and simplifying the model during load, you can make it work. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

thanks for you advise .. I didn't do exactly what you suggested, but it set the foundation to a solution .. 

thank you very much!

aren't you retired? or is this what retirement looks like? 🤣

------------------------------------
Brunner BI focusing on Microsoft Power BI development and consulting
Developers of external tool "Measure Killer"
My blog

😜. Retirement for me is answering questions that I want to answer as opposed to answering questions I have to answer in order to earn a living, whether I want to answer them or not. 🙂



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

That is a great answer!

------------------------------------
Brunner BI focusing on Microsoft Power BI development and consulting
Developers of external tool "Measure Killer"
My blog

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.