Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
mahirk81
Microsoft Employee
Microsoft Employee

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
v-alq-msft
Community Support
Community Support

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

4 REPLIES 4
v-alq-msft
Community Support
Community Support

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.

v-alq-msft
Community Support
Community Support

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.

 

 

Very good solution, however the image does not appear, I get this, what can it be due to?

javimendez_0-1738007767738.png

amitchandak
Super User
Super User

@mahirk81 , bookmark should help

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.