Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Slicer to control data from two tables.

In a dashboard, I have data displayed from two tables. The two tables have few same attribute columns. How do I create a slicer to control all of the data displayed? For now if I choose slicer from either of the table, it only control the data for that particular table. Please help, thank you. 

  • Hi Anonymous 

     

    If there's a relationship betwen the two tables, then a single slicer will control both of them.

     

    Do you have a relationship set up between tables?

     

    Regards

     

    Phil

2 Replies

  • Hi Anonymous 

     

    If there's a relationship betwen the two tables, then a single slicer will control both of them.

     

    Do you have a relationship set up between tables?

     

    Regards

     

    Phil

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    1. As PhilipTreacy mentioned, you could build relationship between the two tables.

     

    2.Or add a new table with all distinct values from Table1 and Table2 for slicer, like:

    For Slicer = DISTINCT( UNION( VALUES(Table1[Column1]),VALUES(Table2[Column1])))

    Then build relationships between For slicer and Table1, For slicer and Table2. Or create measures for visual-level filters later:

    Measure 1 = IF(MAX('Table1'[Column1]) in ALLSELECTED('For Slicer'[Column1]),1,0)
    Measure 2 = IF(MAX('Table2'[Column1]) in ALLSELECTED('For Slicer'[Column1]),1,0)

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.