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
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
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.