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
Danial26
New Member

Filter rows based on 2 related tables

Hi There,

So I have 2 tables with the same unique ID. Both tables has a column called department name. The Business logic behind both tables are as below:

Table B can have a value of Department 1 but have have 2 different Department Value in Table A. 

Table A can have a value of Department 1 but Have no Values at all in Table B

 

Table A:

ID

Department Name

1

Dep1

2

Dep2

3

Dep3

4

Dep1

 

Table B:

IDDepartment Name
1Dep1
2Dep1
3Dep3


So I would like to create a table visuals in PowerBI that has filter out the row of Filter A Based on the column from Table B that has a value of Dep1 and also Value of Dep1 In Table A

 

ID (From Table A)Department Name
1Dep1
2Dep2
4Dep1

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Danial26 , Create a slicer based on Table A dept

 

Create a measure and add it to the visual having column from table 2 or use it as a visual level filter

 

measure = calculate(countrows(Table2), filter(Table2, Table2[dept] in values(Table1[Dept]) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , I am so sorry but I was editing my post and before I managed to post it, you manage to answer it. There is another condition that I have added. Do you think it will work with the added conditions? so sorry again as I am new to the community 

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.