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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mysasai
Frequent Visitor

Dynamic Filtering of Two tables based on One slicer, multiple selected values

Hi all,

 

I have a situation and I'm assuming it is not possible with straight forward functionalities of PBI. 

 

Please help me in solving this. 

 

I have a data source, something like below. 

mysasai_0-1669284210108.png

 

And there are two table Visuals and a slicer present on the canvas. like below. Table 1 is filtered to show only A,B,C,D using filters on this visual. Similarly, Table2 for E,F,G,H.

 

mysasai_0-1669283752271.png

Now, the question is when I select any slicer value: for example A & B are selected the table B goes blank like below.

 

mysasai_1-1669283902272.png

Is there any way to control the interation where when A, B are selected it should not impact Table2. and vice versa, E, F are selected it should not show Table1 as blank.

 

Thanks in Advance.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mysasai ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669963115904.png

Table2:

create with below dax formula:

Table 2 = VALUES('Table'[Name])

vbinbinyumsft_1-1669963137561.png

3. create measure with below dax formula

Measure2 =
VAR _str =
    IF ( ISFILTERED ( 'Table 2'[Name] ), CONCATENATEX ( 'Table 2', [Name],, "" ) )
VAR tmp = {
    "A",
    "B",
    "C",
    "D",
    "ABCD",
    "ABD",
    "ABC",
    "ACD",
    "BCD",
    "AB",
    "AC",
    "AD",
    "BD",
    "BC",
    "CD"
}
VAR _name =
    SELECTEDVALUE ( 'Table'[Name] )
RETURN
    SWITCH (
        TRUE (),
        _str IN tmp, IF ( CONTAINSSTRING ( _str, _name ), 1 ),
        NOT ( _str IN tmp ), 1
    )
Measure3 =
VAR _str =
    IF ( ISFILTERED ( 'Table 2'[Name] ), CONCATENATEX ( 'Table 2', [Name],, "" ) )
VAR tmp = {
    "E",
    "F",
    "G",
    "H",
    "EFGH",
    "EFG",
    "EFH",
    "EGH",
    "FGH",
    "EF",
    "EG",
    "EH",
    "FG",
    "FH",
    "GH"
}
VAR _name =
    SELECTEDVALUE ( 'Table'[Name] )
RETURN
    SWITCH (
        TRUE (),
        _str IN tmp, IF ( CONTAINSSTRING ( _str, _name ), 1 ),
        NOT ( _str IN tmp ), 1
    )

3. add two table visual with Table fields and add above measure to both visual filter pane, add aslicer visual with Table2 field, cancel the interaction between two table visual 

Animation20.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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
Anonymous
Not applicable

Hi @mysasai ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669963115904.png

Table2:

create with below dax formula:

Table 2 = VALUES('Table'[Name])

vbinbinyumsft_1-1669963137561.png

3. create measure with below dax formula

Measure2 =
VAR _str =
    IF ( ISFILTERED ( 'Table 2'[Name] ), CONCATENATEX ( 'Table 2', [Name],, "" ) )
VAR tmp = {
    "A",
    "B",
    "C",
    "D",
    "ABCD",
    "ABD",
    "ABC",
    "ACD",
    "BCD",
    "AB",
    "AC",
    "AD",
    "BD",
    "BC",
    "CD"
}
VAR _name =
    SELECTEDVALUE ( 'Table'[Name] )
RETURN
    SWITCH (
        TRUE (),
        _str IN tmp, IF ( CONTAINSSTRING ( _str, _name ), 1 ),
        NOT ( _str IN tmp ), 1
    )
Measure3 =
VAR _str =
    IF ( ISFILTERED ( 'Table 2'[Name] ), CONCATENATEX ( 'Table 2', [Name],, "" ) )
VAR tmp = {
    "E",
    "F",
    "G",
    "H",
    "EFGH",
    "EFG",
    "EFH",
    "EGH",
    "FGH",
    "EF",
    "EG",
    "EH",
    "FG",
    "FH",
    "GH"
}
VAR _name =
    SELECTEDVALUE ( 'Table'[Name] )
RETURN
    SWITCH (
        TRUE (),
        _str IN tmp, IF ( CONTAINSSTRING ( _str, _name ), 1 ),
        NOT ( _str IN tmp ), 1
    )

3. add two table visual with Table fields and add above measure to both visual filter pane, add aslicer visual with Table2 field, cancel the interaction between two table visual 

Animation20.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it

more quickly.

@Anonymous , thanks for the solution. This works perfectly. 

amitchandak
Super User
Super User

@mysasai , Stop interaction between the visuals

How Interactions Work- Split Page using interactions to compare - https://youtu.be/GIfRKzhMaR4

 

or use Independent Table

 

Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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