cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

show/hide an Image based on Slicer selection

Hi All,

 

Can we show/hide an Image based on Slicer selection in PowerBI?
Example : I will update the Image in PowerBI and when I select the slicer as Yes, then the Image should show and If it is No, then Images should hide.
 
Is it possilble?
 
Thanks,
Mahi
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: show/hide an Image based on Slicer selection

Hi, @mahirk81 


You may create a table like below.

New:

f1.png

 

Then you may modify the measure as below.

Visual control = 
IF(
    SELECTEDVALUE(New[IsDisplay])="Yes",
    1,
    IF(
        SELECTEDVALUE(New[IsDisplay])="No",
        0
    )
)

 

Result:

f2.png

f3.png

 

Best Regards

Allan

 

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

View solution in original post

3 REPLIES 3
Highlighted
Super User IV
Super User IV

Re: show/hide an Image based on Slicer selection

@mahirk81 , bookmark should help

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Community Support
Community Support

Re: show/hide an Image based on Slicer selection

Hi, @mahirk81 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

Test(a calculated table):

Test = DISTINCT('Table'[ID])

 

You need to set data category for 'Image url' as Image URL.

d2.png

 

Then you may create a measure as beolw.

Visual control = 
IF(
    ISFILTERED('Test'[ID]),
    IF(
        SELECTEDVALUE('Table'[ID]) in FILTERS('Test'[ID]),
        1,0
    ),
    0
)

 

Finally you may put the measure in the visual level filter and use the 'ID' column from 'Test' to filter the result.

d3.png

d4.png

 

Best Regards

Allan

 

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

 

 

Highlighted
Community Support
Community Support

Re: show/hide an Image based on Slicer selection

Hi, @mahirk81 


You may create a table like below.

New:

f1.png

 

Then you may modify the measure as below.

Visual control = 
IF(
    SELECTEDVALUE(New[IsDisplay])="Yes",
    1,
    IF(
        SELECTEDVALUE(New[IsDisplay])="No",
        0
    )
)

 

Result:

f2.png

f3.png

 

Best Regards

Allan

 

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

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors