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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
mehaksultana_20
Frequent Visitor

relationships

Hi ,

 

I am creating a report based on 5 tables (customer,sales,date,location) 4 from sqlserver and 1 from excel.

All the three tables from sql are behaving as expected (filtering accurate data on date and region ) and working correctly with the relatinship, except for the table coming from excel. The excel have a column called Company Number which is named as customer id in other 2 sales and customer.

I have mapped excel.company number to sqlserver.customer.customer_id. 

still unable to achieve the relationship as when trying to create a visualization table campany name from excel  and total sales from sales error is popping. On selecting the option dont summarise on sales.totalsale the  error is popping asking to "FIX THIS".

The error is  "cant determine relationships between the two or more fields."

 

Kindly help , as how to establish the appropriate relationship in order to achieve the desired data.

1 REPLY 1
TomMartens
Super User
Super User

Hey, not sure if I'm correct assuming your relationships looks similar to this

relError.png

 

This works in the report, w/o throwing an error, the values shown are nevertheless wrong, another story.

If change the aggregation of amount to "Don't summarize", I got an error.

 

Assuming that your Excel files contains additional information that is not available in your SQL Server table and you just need the Excel table to gain access to this information (and there is a one to one relationship between sqlCustomer.customer_id and xlCustomer.customerid you can rebuild your relationship in this way.

 

relError resolved.png

 

Create a 1-to-1 relationship with filter direction "Both".

 

But, my final recommendation, is remove the 2nd customer table, and use the Merge function from PowerQuery to Pull the customername column from xlCustomer table into the sqlCustomer table. The simply reduces the number of tables and hence model complexity.

 

Hope this helps

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.