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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Syndicate_Admin
Administrator
Administrator

Cross-table filter

Good morning

I have two tables:

- One of them contains a single column with names (namesT)

- The other table (data) has more data and among them a column with more than one name per column (name).

I would like to know how I can make a filter so that by selecting a value from the table (namesT), it takes out all the rows of the table (data) that contain that information.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

I suggest you to Split Column in Power Query Editor.

My Sample:

vrzhoumsft_0-1683709030345.png

I add an index column and then split [NameT] column by comma,

vrzhoumsft_1-1683709067145.png

I suggest you to remove or inactive the relationship between two tables.

Filter Measure =
VAR _SELECTVALUE =
    VALUES ( 'Table'[NameT] )
VAR _Counttable1 =
    COUNTROWS ( _SELECTVALUE )
VAR _Counttable2 =
    CALCULATE (
        COUNTROWS ( 'Table (2)' ),
        FILTER ( 'Table (2)', [NameT] IN _SELECTVALUE )
    )
RETURN
    IF ( _Counttable1 = _Counttable2, 1, 0 )

Add this measure into visual level filter and set it to show items when value =1.

vrzhoumsft_2-1683709657905.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

A relationship already exists, and it doesn't work.

The contents of the T-names table would be as follows:

Nerea
Pedro
Jaime
Silvia
Juan

And the name cell of the data table would look like this:

Juan,Silvia
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

I suggest you to Split Column in Power Query Editor.

My Sample:

vrzhoumsft_0-1683709030345.png

I add an index column and then split [NameT] column by comma,

vrzhoumsft_1-1683709067145.png

I suggest you to remove or inactive the relationship between two tables.

Filter Measure =
VAR _SELECTVALUE =
    VALUES ( 'Table'[NameT] )
VAR _Counttable1 =
    COUNTROWS ( _SELECTVALUE )
VAR _Counttable2 =
    CALCULATE (
        COUNTROWS ( 'Table (2)' ),
        FILTER ( 'Table (2)', [NameT] IN _SELECTVALUE )
    )
RETURN
    IF ( _Counttable1 = _Counttable2, 1, 0 )

Add this measure into visual level filter and set it to show items when value =1.

vrzhoumsft_2-1683709657905.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Alex_Serebr
Frequent Visitor

It should work if you create relationship between tables (namesT and data)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.