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
martim0305
Frequent Visitor

Need Help with Searching for One Value and Filtering by Another in Power BI

Hey everyone,

I’m facing a challenge in Power BI and hoping someone can help me out. I have a dataset like this:

Student Class
John B
Mary B
Martin B
Louis A
Thomas A
Andrew A

My goal is to search for a specific student, for example, "John," and have Power BI automatically filter and display all students from the same class (in this case, all students from class B), instead of just showing data related to the selected student.

Is there a way to configure this in Power BI? Any tips or solutions would be much appreciated!

Thanks in advance!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@martim0305 

you need to duplicated the table. One is for filtering and the other is for displaying. 

then you create a measure

Measure =
VAR _class=max('Table'[Class])
return if (_class=max('Table 2'[Class]),1)
 
add this measure to visual filter and set to 1
 
11.PNG
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @martim0305 ,

Did the replies offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other problems, you can offer some information so that can provide more suggestion for you.

Best regards,

Lucy Chen

 

ryan_mayu
Super User
Super User

@martim0305 

you need to duplicated the table. One is for filtering and the other is for displaying. 

then you create a measure

Measure =
VAR _class=max('Table'[Class])
return if (_class=max('Table 2'[Class]),1)
 
add this measure to visual filter and set to 1
 
11.PNG
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It worked. Really thankful for your help!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




lbendlin
Super User
Super User

Use a disconnected reference table for your search and then use a measure as a visual filter for the actual data.

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.