Forum Discussion
How to Link Two Search Bars in Power BI?
Hi everyone,
In my Power BI report, I have two search bars on the same page — one for filtering by person and another for filtering by department.
Each slicer is intended to control separate sets of visuals:
The person slicer filters person-level stats.
The department slicer filters department-level stats.
The visuals for each are separated by a partition on the page.
Is there a way to link the two slicers so that selecting a person automatically filters the department slicer (or vice versa)? Or at least make them aware of each other in a way that helps avoid conflicting selections?
Thanks in advance for your help!
Hello sfarooq3,
Yes — you can make the two slicers “aware” of each other in Power BI. A few approaches depending on your model:
Model relationship (recommended)
If your Person table has a column like DepartmentID, make sure there’s a relationship between Person → Department in your data model.
When that relationship exists, selecting a person will automatically filter their department (and vice versa).
In this setup, slicers are naturally linked through the model.
Sync slicers (for same field)
If both slicers come from the same field (e.g., Department), you can use Sync slicers (View → Sync slicers pane).
But since here they’re different fields (Person vs Department), model relationships are the right way.
Avoid conflicting selections
If you want both slicers independent but still “consistent,” consider using a hierarchical slicer (Person under Department). That way, when you pick a Department, the Person slicer only shows people in that department.
- Alternative: DAX measure filter logic : you can refer to GilbertQ post 😉
Hope it can help you !
Best regards,
Antoine
3 Replies
- GilbertQ
Super User
Hi sfarooq3
what you can use is a measure which will then Filter the data based on the selection. Here is an article from SQL BI explaining how this works and how to implement it Filter slicers without using bidirectional filters in Power BI - SQLBI
- AntoineW
Super User
Hello sfarooq3,
Yes — you can make the two slicers “aware” of each other in Power BI. A few approaches depending on your model:
Model relationship (recommended)
If your Person table has a column like DepartmentID, make sure there’s a relationship between Person → Department in your data model.
When that relationship exists, selecting a person will automatically filter their department (and vice versa).
In this setup, slicers are naturally linked through the model.
Sync slicers (for same field)
If both slicers come from the same field (e.g., Department), you can use Sync slicers (View → Sync slicers pane).
But since here they’re different fields (Person vs Department), model relationships are the right way.
Avoid conflicting selections
If you want both slicers independent but still “consistent,” consider using a hierarchical slicer (Person under Department). That way, when you pick a Department, the Person slicer only shows people in that department.
- Alternative: DAX measure filter logic : you can refer to GilbertQ post 😉
Hope it can help you !
Best regards,
Antoine