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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
TGAdmin
Frequent Visitor

Default Image via Slicer

Issue : Displaying an image when "All" is selected in slicer

 

Current Implementation : I have a Slicer (Country) that has linked the Image visual to it among other visuals. The image contains URLs of a Flag Image for each country. The Image visual currently works great whenever the slicer is on a single value. However, it would be nice if there was a way to have the the Image default to a different picture whenever there was more than one country selected in my Slicer.

 

I currently don't see a way to do this but thought I'd post to the community in case someone has figured out a way.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @TGAdmin ,

 

You should store the default image URL into dataset.

1.PNG

 

New a calculated table which is unrelated to above image table, to list all available slicer items.

slicer = VALUES(Table6[Column1])

2.PNG

 

Add below measure into Image visual "visual level filters", set its value to 1.

Check measure =
IF (
    COUNT ( slicer[Column1] ) <= 1
        && SELECTEDVALUE ( Table6[Column1] ) = SELECTEDVALUE ( slicer[Column1] ),
    1,
    IF ( SELECTEDVALUE ( Table6[Column1] ) = "Default Image", 1, 0 )
)

3.PNG4.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @TGAdmin ,

 

You should store the default image URL into dataset.

1.PNG

 

New a calculated table which is unrelated to above image table, to list all available slicer items.

slicer = VALUES(Table6[Column1])

2.PNG

 

Add below measure into Image visual "visual level filters", set its value to 1.

Check measure =
IF (
    COUNT ( slicer[Column1] ) <= 1
        && SELECTEDVALUE ( Table6[Column1] ) = SELECTEDVALUE ( slicer[Column1] ),
    1,
    IF ( SELECTEDVALUE ( Table6[Column1] ) = "Default Image", 1, 0 )
)

3.PNG4.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yuliana Gu,

 

Thank you very much for the quick response. Makes sense and I'll incorporate it this afternoon.

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.