Forum Discussion

atallah's avatar
atallah
Regular Visitor
1 year ago
Solved

slicer issue

Hello Power Bi community

 

I have an issue with the slicer,

Basically i have a table with category, subcategory and payees

 

i have a slicer visual for payees

I have a table visual for subcategory and total amount

 

Now my issue i want when i select the subcategory in my table visual, i want the slicer to show only payees related to that subcategory

 

I tried visual interactions but payee is being fixed, like it doesnt filter based on subcategory selection in my table visual

 

but when i select something in payees ,it filters my table visual but not other way around

 

My data model and expense report are below

 

Thanks for any suggestions

 

expense data modelexpense report

4 Replies

  • Hi atallah,
    We can address this issue with three approaches:

    • Approach 1 (bidirectional filtering) is the simplest but may impact performance in large models.
    • Approach 2 (supporting table) is more controlled and ideal for complex filtering scenarios.
    • Approach 3 (drillthrough) avoids modifying the slicer behavior but adds an extra layer of navigation.

    Approach 1: Use a Bidirectional Relationship

    • Enable Bidirectional Filtering:
      In the data model, ensure the relationship between Category/Subcategory (in your Expenses table) and Payee is set to bidirectional. This will allow filters from your table visual (subcategory selection) to propagate to the slicer.

    Approach 2: Create a Supporting Table

    • Create a Distinct Table for Payees:

       

      • Go to the Modeling tab in Power BI Desktop.

      • Click on New Table and enter the following DAX formula:

        • DAX
          DistinctPayees = DISTINCT(Expenses[Payee])
      • Create a Measure to Filter Payees: Create a measure that calculates the payees relevant to the selected subcategory:
        FilteredPayees = 

        CALCULATE(

        DISTINCT(Expenses[Payee]),

        FILTER(

        Expenses,

        Expenses[SubCategory] IN VALUES(Expenses[SubCategory])

        )

        )
        • Use the New Table in Your Slicer: Replace the original slicer with the DistinctPayees table slicer. This slicer will now dynamically update based on the selected subcategory in your table visual.

    Approach 3: Use a Drillthrough Page
    If you don't want to modify your data model:

    • Enable drillthrough functionality in your report.
    • Add a second page with a slicer for Payees.
    • Set up drillthrough on the Subcategory field, allowing users to navigate to the second page and see filtered Payees.

    You Can also refer to this Youtube Video:Link

    I hope the provided solution works for you

    If I have resolved your question, please consider marking my post as a solution. Thank you!
    A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.

    • atallah's avatar
      atallah
      Regular Visitor

      yes this what i realised, as i tried another table visual instead of slicers with payee and it filtered properly, but when i change the payee table to slicer it doesnt filter

  • atallah's avatar
    atallah
    Regular Visitor

    Thanks for the reply, appreciated

    approach 1: as payees and categories and subcategories are in same table, this wont work

    approach 3: Yes i tried it ,by putting subcategory as drillthrough in new page, this works, but i want my table visual to filter payees if i select any in the table visual

    approach 2: it didnt work, the measure am not able to bring it into the slicer