cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
H3nning
Resolver I
Resolver I

Filter Table based on selector in unrelated table

Hi, I have so following problem and I hope someone can assist.

 

I have a Table with two values which I use as a selector.

SWITCH
A
B

 

And I have another table which I want to filter based on the slicer in SWITCH:

 

ID_ifA_ifB
111
201
300

 

So if A is selected my table visual should only show row 1. If B is selected it should show 1 and 2.

 

Thanks in advance!

1 ACCEPTED SOLUTION
H3nning
Resolver I
Resolver I

Found it myself. I just had to add a measure summing up _ifA and _ifB depending on the Slicer. And then I added the SUm to the filter pane of the visual wit the ID already in it and said SUM >0. 

 

SWITCH(VALUES('Switch'[SWITCH])
    ,"A", SUM(table[_ifA])
    ,"B", SUM(table[_ifB])
    ,SUM(table[_ifA])
)

View solution in original post

2 REPLIES 2
H3nning
Resolver I
Resolver I

Found it myself. I just had to add a measure summing up _ifA and _ifB depending on the Slicer. And then I added the SUm to the filter pane of the visual wit the ID already in it and said SUM >0. 

 

SWITCH(VALUES('Switch'[SWITCH])
    ,"A", SUM(table[_ifA])
    ,"B", SUM(table[_ifB])
    ,SUM(table[_ifA])
)

Hi @H3nning

 

Glad you have solved it by yourself! You can accept your reply as solution to close this thread. A closed thread will help other people find your solution more quickly. 

 

Best Regards,
Community Support Team _ Jing

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.