Forum Discussion

nrustamli's avatar
nrustamli
Frequent Visitor
5 years ago
Solved

Multiple slicers for one visual

Hello there. I am trying to apply two separate sliders for one visual. The data I am working on has the following structure:

CountriesYearVariable 1Variable 2Variable 3
Austria2018755621
Austria201975243
Austria202048793
Austria2021736917
Belgium2018825756
Belgium2019673611
Belgium202034455
Belgium202119052
Denmark2018223456
Denmark2019851548
Denmark202053157
Denmark20215727100
Ireland2018721837
Ireland2019781954
Ireland2020159762
Ireland2021374572
Netherlands2018491680
Netherlands2019999465
Netherlands2020374312
Netherlands2021848513
Sweden201830799
Sweden201954894
Sweden2020557664
Sweden2021999394

 

The main purpose of the dashboard I want to create is to compare two countries/entities. I want to have the following structure:

 

So the idea is that, Slicer 1 picks the country for Figure 1, Slicer 2 picks the country for Figure 2, but both slicers should pick a country (each) for Figure 0 - so it should have two lines. When I pick one country in each slicer, the Figure 0 turns blank. Would appreciate any help to fix this, but also any ideas that would have a more straightforward way to represent this concept.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi nrustamli ,

     

    The file is here, you can check if it is what you want.

    Because I donโ€™t know your needs, so the value shown in my picture is Variable 1.

    Measure = 
    CALCULATE (
        SUM ( 'Table'[Variable 1] ),
        FILTER ( 'Table', [Countries] = SELECTEDVALUE ( Slicer1[Countries] ) )
    )
    Measure 2=
    CALCULATE (
        SUM ( 'Table'[Variable 1] ),
        FILTER ( 'Table', [Countries] = SELECTEDVALUE ( Slicer2[Countries] ) )
    )
    Measure 3 = IF(ISFILTERED(Slicer2[Countries]),[Measure])
    Measure 4 = IF(ISFILTERED(Slicer1[Countries]),[Measure 2])

     

     

     

    Best Regards,

    Stephen Tao

     

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

7 Replies

  • nvprasad's avatar
    nvprasad
    Solution Sage

    Hi,

     

    You can use the edit interactions option under the format tab (Select slicer first then go to format tab) to fix this issue.

     

     

     

    Appreciate a Kudos! ๐Ÿ™‚
    If this helps and resolves the issue, please mark it as a Solution! ๐Ÿ™‚

    Regards,
    N V Durga Prasad

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nrustamli ,

     

    The file is here, you can check if it is what you want.

    Because I donโ€™t know your needs, so the value shown in my picture is Variable 1.

    Measure = 
    CALCULATE (
        SUM ( 'Table'[Variable 1] ),
        FILTER ( 'Table', [Countries] = SELECTEDVALUE ( Slicer1[Countries] ) )
    )
    Measure 2=
    CALCULATE (
        SUM ( 'Table'[Variable 1] ),
        FILTER ( 'Table', [Countries] = SELECTEDVALUE ( Slicer2[Countries] ) )
    )
    Measure 3 = IF(ISFILTERED(Slicer2[Countries]),[Measure])
    Measure 4 = IF(ISFILTERED(Slicer1[Countries]),[Measure 2])

     

     

     

    Best Regards,

    Stephen Tao

     

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

    • nrustamli's avatar
      nrustamli
      Frequent Visitor

      Thanks a lot Stephen, this indeed solves it!

    • hereskieu's avatar
      hereskieu
      New Member

      Hi Stephen, 

       

      I have the similar project like nrustamli that I want to apply two slicers(filters) for one visual.  I tried to follow your measures but it ran into an issues.  It keeps telling me that 'Cannot find table 'Slicer1'.  Can you help me on how to fix it? 

       

      TIA,

      Kieu