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
jatneerjat
Helper V
Helper V

How power bi create relationships internally

Hi,

 

I have two tables one table1 have customername,country and states and another table table2 have customer,countryname,statesname and salary.

i have 2 slicers for the columns i have in my table1 and i create a one to many relationship between customername and customer.

now if i select the slicer on country column or  states slicer then how powerbi know that it has to look into countryname or statesname column of table2 or both the tables should have the same names .

 

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi jatneerjat,

 

"Values is unique in one column of tableA while values can be found in another column in tableB" will be recognized as one-to-many relationship by power bi. That's how the relationship can be automatically created.

 

Regards,

Jimmy Tao

ricardocamargos
Continued Contributor
Continued Contributor

Hi @jatneerjat,

 

If I understood your question Power BI matches tables when the values are equals on both tables. If table 2 has the correspondent value on table 1, you will see the filter working.

 

It's important to take care about space on text columns, if your columns contains space before/after the values probably you are gonna see nothing returning to you, you have to handle it (Power Query has the "TRIM" function to remove spaces before/after).

 

 

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.