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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
AndyU
New Member

Database relationships and filtering

Hello,

 

I have two tables with the that are linked in a relationship. Table A contains all the information I wish to present, and table B is just to check certain criteria for the same rows and to filter out unwanted ones from the data presented based on Table A. However, it seems like PowerBI is filtering out any rows that are non-existant in table B, not only the ones I have asked it to filter based on certain criteria. Example:

 

Table A:

Relationship ColumnData to be presented
133
245
3634
4623
5456
6458
7354

 

Table B:

Relationship ColumnFilter Criteria
1Red
2Blue
3Green
4Red
5Yellow

 

In this example, I wish to filter away Blue and Green, so that only data from Red and Yellow is presented. In addition, I would also like to present the data in rows 6 and 7 in table A, even though it is not present in table B, as I am only looking to filter away any Blues and Greens that are present in table B. Right now PowerBI seems to be filtering away 6 and 7 as well since it can't find them in table B.

 

Any help would be appreciated!

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @AndyU,

Based on my test, you could refer to below formula:

Measure = CALCULATE(MAX('TableB'[Filter Criteria]),FILTER('TableB','TableB'[Filter Criteria]<>"Blue"&&'TableB'[Filter Criteria]<>"Green"))

And choose the 'Show items with no data':

1.PNG

 

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Daniel,

 

Thanks for your suggestion. I tried playing around with it but I couldnt get it to do what I wanted. After some testing it seems like the issue is that in the real database (not the example I gave), table B has duplicates in the relationship column, which prevents a one to one cardinality. Once I deleted the duplicates, it seems to be working fine and is including all those entries in table A that do not exist in table B. However, this is not an optimal solution was I don't want to keep manually going through the duplicates and then deleting them or renaming. 

 

Is there a way to make this work with duplicates?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.