Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello there. I am trying to apply two separate sliders for one visual. The data I am working on has the following structure:
Countries | Year | Variable 1 | Variable 2 | Variable 3 |
Austria | 2018 | 75 | 56 | 21 |
Austria | 2019 | 7 | 52 | 43 |
Austria | 2020 | 48 | 79 | 3 |
Austria | 2021 | 73 | 69 | 17 |
Belgium | 2018 | 82 | 57 | 56 |
Belgium | 2019 | 67 | 36 | 11 |
Belgium | 2020 | 3 | 44 | 55 |
Belgium | 2021 | 1 | 90 | 52 |
Denmark | 2018 | 22 | 34 | 56 |
Denmark | 2019 | 85 | 15 | 48 |
Denmark | 2020 | 5 | 31 | 57 |
Denmark | 2021 | 57 | 27 | 100 |
Ireland | 2018 | 72 | 18 | 37 |
Ireland | 2019 | 78 | 19 | 54 |
Ireland | 2020 | 15 | 97 | 62 |
Ireland | 2021 | 37 | 45 | 72 |
Netherlands | 2018 | 49 | 16 | 80 |
Netherlands | 2019 | 99 | 94 | 65 |
Netherlands | 2020 | 37 | 43 | 12 |
Netherlands | 2021 | 84 | 85 | 13 |
Sweden | 2018 | 30 | 79 | 9 |
Sweden | 2019 | 54 | 89 | 4 |
Sweden | 2020 | 55 | 76 | 64 |
Sweden | 2021 | 99 | 93 | 94 |
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.
Solved! Go to Solution.
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.
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.
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
Thanks a lot Stephen, this indeed solves it!
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
Hello, could you please elaborate on this? Because my first thought was about the interactions as well, here how the interactions of Slicer 1 look:
And here are the interactions of Slicer 2:
Anything else that needs to be done here?
@nrustamli , you need two lines one from slicer 1 and one from slicer 2. In that case you need independent tables(at least one)
refer my date example - You need to slicer for country in place of date
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
@nrustamli , You should be able to do that with edit interaction. Switch interactions between 1 and 2.
https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |