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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
KatheB
Frequent Visitor

Filter two tables with the same file but different criteria

Pregunta.png

Hello

I have two twin tables connected with a table called hierarchy, the first table (table1) is connected to the hierarchy table with a field called BU, so we have Table1.BU = Hierarchy.BU.

On the other hand in table two the connection is with the field Co Lead, i.e. Table2.Colead = Hierarchy.BU

What I want is that when filtering by Hierarchy.BU

Table 1 shows me all the rows related to the BU, but table 2 shows me everything related to the Hierarchy to which the Selected BU belongs.

How can I do that? Thanks

1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

You can add a column "Hierachy" to Table 2 that contains the corresponding Hierarchy to Table 2.Co Lead and change the relationship to Hierarchy.Hierarchy=Table 2.Hierachy. If you want to avoid a many to many relationsip, build a table inbetween that contains just a distinct list of Hierarchy. 
You could also create a measure that returns a blank value for all Table 2 rows that belong to excluded rows and a non-blank for all rows that are included and use it e.g. as a visual level filter that you test for "is not blank". But the relationship solution is probably faster.

View solution in original post

2 REPLIES 2
KatheB
Frequent Visitor

TI used option 1, I created a Hierarchy column in Table 2 and changed the relationship as you mentioned. Thank you very much!

Martin_D
Super User
Super User

You can add a column "Hierachy" to Table 2 that contains the corresponding Hierarchy to Table 2.Co Lead and change the relationship to Hierarchy.Hierarchy=Table 2.Hierachy. If you want to avoid a many to many relationsip, build a table inbetween that contains just a distinct list of Hierarchy. 
You could also create a measure that returns a blank value for all Table 2 rows that belong to excluded rows and a non-blank for all rows that are included and use it e.g. as a visual level filter that you test for "is not blank". But the relationship solution is probably faster.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.