Forum Discussion

sfarooq3's avatar
sfarooq3
Frequent Visitor
11 months ago
Solved

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:

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

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

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

    4. Alternative: DAX measure filter logic : you can refer to GilbertQ post 😉

     

    Hope it can help you ! 

    Best regards,

    Antoine

3 Replies

  • Hello sfarooq3,

     

    Yes — you can make the two slicers “aware” of each other in Power BI. A few approaches depending on your model:

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

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

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

    4. Alternative: DAX measure filter logic : you can refer to GilbertQ post 😉

     

    Hope it can help you ! 

    Best regards,

    Antoine

  • v-sdhruv's avatar
    v-sdhruv
    Icon for Community Support rankCommunity Support

    Hi sfarooq3 ,

    Just wanted to check if you got a chance to review the suggestions provided and whether that helped you resolve your query?

    Thank You