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
Anonymous
Not applicable

Creating relationships between tables when the system considers that there is a circular dependency

Respect Colleagues, please help me solve the problem.

 

The model has tables: «Partners», «FactSales», «PlanSales», «Calendar».

6.png

  1. The table «FactSales» must be linked to the table «Partners» by the field «PartnerID».
  2. The table «PlanSales» must be linked to the table «Partners» by the field «PartnerID».
  3. The table «FactSales» must be linked to the table «Calendar» by the field «Date», so that we can use Slicer for months.
  4. The table «PlanSales» must be linked to the table «Calendar» by the field «Date», so that we can use Slicer for months.
  5. The table «Partners» must be linked to the table «Calendar» by the field «Date», so that we can use Slicer for months.
  6. Problem 1: if we link tables «FactSales» – «Calendar», «PlanSales» – «Calendar», «Partners» – «Calendar», then the system does not allow to link tables «FactSales» – «Partners», «PlanSales» – «Partners» (these connections are inactive). A message appears:5.jpg
 

7. Due to this problem, when creating visualizations for «FactSales» and «PlanSales», values are not displayed:

9.png

8. Problem 2: if we link tables «FactSales» – «Partners», «PlanSales» – «Partners», «Partners» – «Calendar», then the system does not allow to link tables «FactSales» – «Calendar», «PlanSales» – «Calendar» (these connections are inactive).

2.png

 

9. Due to this problem, when creating visualizations for «FactSales» and «PlanSales», values for months are not displayed:

8.png

 

 

Question: how can we link the tables «FactSales» – «Partners», «PlanSales» – «Partners», «Partners» – «Calendar», «FactSales» – «Calendar», «PlanSales» – «Calendar», so that you can use Slicer for months and so that visualizations are built correctly?

 

Thank you for your help.

 

With respect, Anastasiya.

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

It is suggested to use a star schema like below instead of a schema with loops.

e1.png

 

If you have a table pattern like below, with loops, then cross filtering can create an ambiguous set of relationships. For example, if you sum up a field from TableX and then choose to filter by a field on TableY, then it’s not clear how the filter should travel, through the top table or the bottom table.

e2.png

 

 

You may make the relationships between tables «FactSales» – «Partners», «PlanSales» – «Partners» inactive and other relationships active. If you want to calculate with the inactive relationship, you may use userelationship()  function to specify the inactive relationship to be used in a specific calculation as the one that exists between two tables.

 

Best Regards

Allan

 

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

 

 

View solution in original post

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

It is suggested to use a star schema like below instead of a schema with loops.

e1.png

 

If you have a table pattern like below, with loops, then cross filtering can create an ambiguous set of relationships. For example, if you sum up a field from TableX and then choose to filter by a field on TableY, then it’s not clear how the filter should travel, through the top table or the bottom table.

e2.png

 

 

You may make the relationships between tables «FactSales» – «Partners», «PlanSales» – «Partners» inactive and other relationships active. If you want to calculate with the inactive relationship, you may use userelationship()  function to specify the inactive relationship to be used in a specific calculation as the one that exists between two tables.

 

Best Regards

Allan

 

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

 

 

Anonymous
Not applicable

Thanks a lot, Allan!

glissando
Resolver II
Resolver II

What is the date in the Partner table and what is its relationship to the Fact and Plan tables?

 

xcan you provide some sample data for each of the tables?

 

Thanks

parry2k
Super User
Super User

@Anonymous what is the purpose of linking partner with the calendar? You can make this inactive relationship and all other relationships active. 

 

Wherever you need to use this inactive relationship, use userrelationship function in the measure to make inactive relationship active.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Many Thanks, @parry2k!

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.