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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Saarek
Helper III
Helper III

Many to many join not working when filters applied

I'm trying to resolve an issue I have with a many to many relationship.

 

I have a primary table that has about a million rows and then a secondary table that has just 76 rows.

The secondary table contains some financial targets split by month and branch. This table contains three columns that are identical in format to those in the primary data: Branch, Year, APE (think of it as months) and then has some financial values that I want to pull through. Note no values in the secondary table for the three common fields are not present in the primary data set and vice versa.

 

The join is currently set to use the Branch column and at a high level works perfectly. The problem I have is when I try to filter by APE, if I do this the filter only seems to apply to the primary dataset and the seconday sets values remain unchanged. If I bring in the same filter from the secondary source and apply the filter there then only the secondary calculations change.

If I change my join to APE, as opposed to Branch, I get the same issue, albeit for Branch this time.

Essentially whichever value I choose in the join works for both, but Power BI seems unable to apply that logic to the other identical columns.

 

I tried creating two "bridge" tables that allow many to one relationship, but the same issue persisted.

 

Is there a manual way to specify that both Branch and APE are to be used within the relationship?

3 REPLIES 3
nandic
Super User
Super User

@Saarek , did you try creating composite key?
Composite key should be created in both tables and will be in format: column1 & "_" & columns2 & "_" & column3.
Then create join using these columns.

@nandicI'd not given that a try, I'm new to Power BI, so excuse me if I am asking the obvious. But are you suggesting I create a new column within the data using the merge function and concatenate the columns together?

That should work, I'd expect. Let me give it a shot.

Presumably this is a normal stumbling block for Power BI then?

As Power BI accepts only one active relationship between tables, in order to combine multiple columns between tables we need to use this composite key.
The best way is to create this column in Power Query: https://yodalearning.com/tutorials/top-5-ways-concatenate-datausing-m-power-query/


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors
Top Kudoed Authors