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

Relationships error - Cartesian product

Hello, 

 

I am getting an error by using fields from each tables of my model into the same table visual. I think I understand the error but I want to be sure. 

 

Here's my model : 

bridge_model.PNG

 

Here's what I am using into the report (in blue the table visual and it's content, in orange the content of each table) :

bridge_error.PNG 

I am getting the following error while I expected to get the results below (got by SQL query) : 

bridge_error_result.PNGbridge_expected.PNG

 

As I am understanding, Power BI rather than joining every results in a kind of cartesian product prefers to not display anything and showing an error. Am I right on this and is there any way to display the kind of results I am getting with a SQL query ? 

 

Thanks a lot ! 

 

Artkus

1 ACCEPTED SOLUTION

Hi @Anonymous

Due to your relationship is many to one, this may be a logic problem in power bi.

I build two kinds of relationships one to one and many to one.

2.png

Build table visuals:

3.png

Many to one get error and one to one is right.

If you want to get all name columns in one visual, you may build a new table by Merge in Power Qury Editor.

4.png

Select Company Table and Company Inspector Table

5.png

Then we select Inspector Name Column and ID_Inspector in Expand.

6.png

Result:

7.png

Then we do the same steps to merge this table with other two tables.

Result:

8.png

Build a Table visual, result is right.

9.png

You can download the pbix file from this link:  Relationships error - Cartesian product

 

Best Regards,

Rico Zhou

 

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

8 REPLIES 8
Anonymous
Not applicable

Thank you all for your answers. I will go with the custom that do the joins 🙂 

Pragati11
Super User
Super User

HI @Anonymous ,

 

Can you try moving "Company ID" column along with other columns in the table visual and see if you still get same error?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 , 

 

I tried (even with ID_Company from each tables) and I am still getting the error. 

 

bridge_companyID.PNG

Hi @Anonymous

Due to your relationship is many to one, this may be a logic problem in power bi.

I build two kinds of relationships one to one and many to one.

2.png

Build table visuals:

3.png

Many to one get error and one to one is right.

If you want to get all name columns in one visual, you may build a new table by Merge in Power Qury Editor.

4.png

Select Company Table and Company Inspector Table

5.png

Then we select Inspector Name Column and ID_Inspector in Expand.

6.png

Result:

7.png

Then we do the same steps to merge this table with other two tables.

Result:

8.png

Build a Table visual, result is right.

9.png

You can download the pbix file from this link:  Relationships error - Cartesian product

 

Best Regards,

Rico Zhou

 

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

HI @Anonymous ,

 

Is it possible to share your pbix file?

Also, I found a similar thread for this issue:

https://community.powerbi.com/t5/Desktop/issue-with-relationships-between-3-tables/td-p/439734

 

You can try modifying your relationships like don't go for many-to-many relationships. Try creating One-to-many relationship from COMAPNY table to other 3 tables. Ceck if the above thread helps on what is going wrong at your end.

You may try creating a new table using CROSSJOIN as mentioned in the above thread.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

amitchandak
Super User
Super User

@Anonymous , As your group by coming from Many sides. You can keep only one Table from "Many side" tables. So make all other as max of Min

 

Take as min/max for either inspector_name or intermediary_name

Anonymous
Not applicable

Hello @amitchandak , 

 

Thanks for your answer. Unfortunately I am not sure what you mean by "taking max of min". Do you mean take last or first for the name ? 

Anonymous
Not applicable

All tables are linked by the Company ID so it should be good.

 

  • You should check the format of all your columns "Company ID" as it could be the problem. They should have the same data format.

Hope this help.

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.