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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

How to join/create relationship between two tables with non unique values?

Hi,

 

I need to create a graph that uses metrics from two different tables. Both the tables do not use any non-unique keys/columns, the only unique thing would be a combination of the different columns.

 

Here is an example of the schema of the two tables:

 

Table 1 has columns + some extra unneccessary columns: 

rikpatel1998v2_0-1668091473890.png

and some metrics lets say metric x y and z

 

Table 2 has similar columns + some extra unneccessary columns:

rikpatel1998v2_1-1668091599139.png

 

Week_commencing is the same as  booking_week_date in the first table while the rest of the columns represent the same thing too. Table 2 has some associated metrics a b c.

 

How can i establish a relationship between these two tables such that I can plot some simple charts that show e.g metric a and metric x on a line chart together, against the booking_week_date/week_commencing, while being filterable by the other columns in the tables (country, city, region etc).

 

I've tried creating a many to many relationship with the date field in both the tables, however, when applying a filter on e.g. destination country, it only works on the metric from which the destination country field was taken from.

 

Thanks

1 ACCEPTED SOLUTION
timg
Solution Sage
Solution Sage

Hi RikPatel,

Here you could make good use of dimensional modelling. This means you create tables in which the descriptive information is separated by topics into dimensions (e.g. in this case you could create a table with all unique dates and a table with all unique locations). you then create a relationship between these dimension tables and the tables containing your metrics (Fact tables). This way, whenever you select a location or date from your dimension table, all fact tables will be filtered. So you can plot metrics from both tables in the same graph.

Hope that helps a bit. Here's an example of a dimensional model from the microsoft learn page for reference: Tutorial: From dimensional model to stunning report in Power BI Desktop - Power BI | Microsoft Learn

 

Best regards,

 

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
timg
Solution Sage
Solution Sage

Hi RikPatel,

Here you could make good use of dimensional modelling. This means you create tables in which the descriptive information is separated by topics into dimensions (e.g. in this case you could create a table with all unique dates and a table with all unique locations). you then create a relationship between these dimension tables and the tables containing your metrics (Fact tables). This way, whenever you select a location or date from your dimension table, all fact tables will be filtered. So you can plot metrics from both tables in the same graph.

Hope that helps a bit. Here's an example of a dimensional model from the microsoft learn page for reference: Tutorial: From dimensional model to stunning report in Power BI Desktop - Power BI | Microsoft Learn

 

Best regards,

 

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thank you Tim!

 

I created unique tables of all the other columns, (calendar table with booking_week_date and week num), a unique country table, unique city table, unique region table and unique sub region table and then established a one to many relationship with the two main tables using these unique tables.

 

I have played around with it and seems like it is working -  I will do some more testing and then mark this as  a solution.

Great to hear it's working!

As a follow-up, instead of multiple location tables you could also make one location table with city, sub-region, region, and country. And then create one relationship between that table and the tables containing metrics. Then you don't need to create a lot of relationships and can still slice 'n dice on all location levels.

Regards and  good luck with the report!

 

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (4,112)