Forum Discussion

ja_02's avatar
ja_02
New Member
1 year ago
Solved

Filter between 2 visual tables from the same data source

Hi,

I have a Task table for the datasource in PowerBI dashboard. This can be an example for Task table structure and data:
ID Category Type
1   1   Main

2   1   Sub

3   2   Main

4   2   Main

5   2   Sub


Now, in Power BI, I added 2 table visuals each have visual filter Type, table visual #1 would only show Type=Main and table visual #2 would only show Type=Sub. What I want is when I click Category=1 in visual#1, visual#2 would show data with type=Sub and Category=1, but the table would be empty and I guess it's because the filter from visual#1 passes ID and Type also to the visual#2. Is there any workaround for this? 

  • Hi ja_02,
    Thank you for reaching out to the Microsoft fabric community forum. Thank you pankajnamekar25, for your inputs on this issue.

    After thoroughly reviewing the details you provided, I reproduced the scenario again, and it worked on my end. I used it as sample data and successfully implemented it.

    outcome:

     


    I am also including .pbix file for your better understanding, please have a look into it:

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

    Thank you for using Microsoft Community Forum.

5 Replies

  • Hello ja_02 

     

    Follow this steps

    Use a Disconnected Category Table to Filter by Category Only

    Create a new disconnected table:

    CategoryFilter = DISTINCT(SELECTCOLUMNS('Task', "Category", 'Task'[Category]))

    Create a measure to check category match

    IsCategorySelected =

    VAR SelectedCategory = SELECTEDVALUE(CategoryFilter[Category])

    RETURN IF(SelectedCategory = 'Task'[Category], 1, 0)

    Apply filters on visuals:

    Visual #1 Filter Type = Main and IsCategorySelected = 1

    Visual #2 Filter Type = Sub and IsCategorySelected = 1

    Use CategoryFilter as a slicer or visual to control both tables.

    Thanks,
     Pankaj Namekar | LinkedIn

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

  • v-kpoloju-msft's avatar
    v-kpoloju-msft
    Community Support

    Hi ja_02,
    Thank you for reaching out to the Microsoft fabric community forum. Thank you pankajnamekar25, for your inputs on this issue.

    After thoroughly reviewing the details you provided, I reproduced the scenario again, and it worked on my end. I used it as sample data and successfully implemented it.

    outcome:

     


    I am also including .pbix file for your better understanding, please have a look into it:

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

    Thank you for using Microsoft Community Forum.

    • v-kpoloju-msft's avatar
      v-kpoloju-msft
      Community Support

      Hi ja_02 

      May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

      Thank you.

      • v-kpoloju-msft's avatar
        v-kpoloju-msft
        Community Support

        Hi ja_02,

        I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
        Thank you.