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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Frede
Helper I
Helper I

Issue with circular relationships

HI!

 

A bit long so please bear with me.

I have a Power BI data model that looks like below. All relationships are single direction and move in the direction of the arrow from ONE to MANY (end of arraw). I am aware that the model should probably be redesigned but this is what I have to work with for now. There are no warnings about circular references by Power BI.

 

I have a matrix visual that displays a summary of costs for a specific AgencyName. For this AGENCY[AgencyName] is used and a summary measure in the COST and BOOKINGWITHAGENCY Amount column like TotalCost = SUM(COST[Amount]) and TotalBookingWithAgency = SUM(BOOKINGWITHAGENCY[Amount]). 

 

AgencyName | TotalCost | TotalBookingWithAgency 

Agent 1                 $100          $120

 

The contents of COST and BOOKINGWITHAGENCY are identical regarding BookingID and Amount (Yes not ideal). So I expected the result to be the same. I noticed a difference in the result of the different measures which I have pinned down to the contents of the INVENTORY table but that got me thinking. 

 

How does Power BI determine how to relate COST[Amount] to the AGENCY[AgencyName]?

It could either go via

COST -> EVENT -> INVENTORY -> AGENCY

or via

COST -> EVENT -> BOOKING ->BOOKINGWITHAGENCY -> AGENCY

 

Again, there are no warning about circular dependencies and if I remove the relationship between INVENTORY and EVENT I get the expected correct result of $120. If I keep the relationship between INVENTORY and EVENT and remove the relationship between EVENT and BOOKING I get TotalCost = $100 again.

Therefore it seems that when both relationships between INVENTORY and EVENT and  BOOKING and EVENT exists, it will take the INVENTORY > EVENT path.

 

 

relationships.png

 

 

1. How does Power BI determine which path to use and can I determine which path is used 

2. I guess the general recommendation would be not to use circular references like this. Why does Power BI not give a warning in this case?

 

Thanks

Frede

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Frede,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi Frede,

 

Can you share a sample file, please? Only a small file is needed that can show your model.

1. That depends on your data model. We can't choose which path to use. But how we select the columns determines the behavior of the Power BI. For instance, there are three [AgenceName] in three different tables. The result depends on which one we choose. 

2. Just see from your image, there aren't any loops. Because the [Cross Filter Direction] is also the key part of the relationship of Power BI. Please refer to the snapshot. 

BTW, the [Event] table and the [BookingWithAgency] seem to have similar contents.

Issue-with-circular-relationships

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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