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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Piotr12
Frequent Visitor

Button to filter out rows based on already used slicer

Hi,

 

I have Entries Table with various rows, among them is "ID Number" and "Origin Country" column. There's another Target Table that registers each "Target Country" a specific ID is related to.

 

The idea is that entry might come from USA (Origin Country column) but it will be assigned to different countries (Target Country column) through different entries in Target Table.

 

Now a person responsible for specific country, knows exactly what their entries are, but would like to easily see which entries comes from other countries. I want them to select their Target Country through drop down filter, and then be able to toggle a button that will filter out all the entries, where Origin Country matches Target Country. The only entries left would be the ones that comes from Origin Country values that are not paired to selected Target Country value. I want this to respond to the Target Country selected in the drop down.

 

For that I created Countries Table that has "Target Country" column and "Origin Country". So a row designates that Target Country with value USA is linked to Origin Country with value USA (for example).

 

Any tips on how I might achieve that? I'm not sure i've described it clear enough.

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Piotr12 

 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Entries Table"

vnuocmsft_0-1712112331871.png

 

"Target Table"

vnuocmsft_1-1712112359951.png

 

First, create relationships between tables. Relationships can be created by going to the Model view and dragging related fields between tables.

 

vnuocmsft_2-1712112519004.png

 

Create a measure. Check for a match between the "Origin Country" in the filter and the "Target country" selected in the filter.

 

OriginMatchesTarget = 
IF(
    CONTAINS(
        'Target Table', 
        'Target Table'[Target Country], SELECTEDVALUE('Entries Table'[Origin Country]), 
        'Target Table'[Target Country], SELECTEDVALUE('Target Table'[Target Country])
    ), 
    "Match", 
    "No Match"
)

 

vnuocmsft_3-1712112694375.png

You may not be able to filter for matches with the button, but you can filter with the filter.

 

Here is the result.

 

vnuocmsft_4-1712112869702.png

 

Regards,

Nono Chen

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

1 REPLY 1
Anonymous
Not applicable

Hi @Piotr12 

 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Entries Table"

vnuocmsft_0-1712112331871.png

 

"Target Table"

vnuocmsft_1-1712112359951.png

 

First, create relationships between tables. Relationships can be created by going to the Model view and dragging related fields between tables.

 

vnuocmsft_2-1712112519004.png

 

Create a measure. Check for a match between the "Origin Country" in the filter and the "Target country" selected in the filter.

 

OriginMatchesTarget = 
IF(
    CONTAINS(
        'Target Table', 
        'Target Table'[Target Country], SELECTEDVALUE('Entries Table'[Origin Country]), 
        'Target Table'[Target Country], SELECTEDVALUE('Target Table'[Target Country])
    ), 
    "Match", 
    "No Match"
)

 

vnuocmsft_3-1712112694375.png

You may not be able to filter for matches with the button, but you can filter with the filter.

 

Here is the result.

 

vnuocmsft_4-1712112869702.png

 

Regards,

Nono Chen

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

 

 

 

Helpful resources

Announcements
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.