Forum Discussion
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!
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 1pls see the attachment below
5 Replies
- ryan_mayuSuper User
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 1pls see the attachment below- martim0305Frequent Visitor
It worked. Really thankful for your help!
- ryan_mayuSuper User
you are welcome
- lbendlinSuper User
Use a disconnected reference table for your search and then use a measure as a visual filter for the actual data.
- AnonymousNot 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