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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Relationship Between two tables

Hi team,

 

I have two tables. Table A contains the count of registrations country wise and Table B contains Total number of usres. I have divide the sum of registrations with the sum of to total registrations to get it country wise. However it is not filtering the country properly as I have takem the country coulmn from Table A. Below is the result what it is giving.
In table A there are 20 rows for India with count 2 in each row so when I will sum that it will give me 40 and in Table B I have 50 rows for India with count 2 on each row so summing that up will come to 100. So the result I want is 40/100, however it is dividing with the sum of all the countries in Table B. When I an trying to create a relationship between thios two tables it is giving en error.

Can someone please help!!!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Create a new table with all the countries in, like

Countries = DISTINCT( UNION(
ALLNOBLANKROW('Table 1'[Country]),
ALLNOBLANKROW('Table 2'[Country])
))

then create one-to-many relationship from the new table to both existing tables. Use the column from the new table in your visuals.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi johnt75

 

Thanks a lot. That helped me solved my problem Thank you.

 

Regards

johnt75
Super User
Super User

Create a new table with all the countries in, like

Countries = DISTINCT( UNION(
ALLNOBLANKROW('Table 1'[Country]),
ALLNOBLANKROW('Table 2'[Country])
))

then create one-to-many relationship from the new table to both existing tables. Use the column from the new table in your visuals.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 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.