Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Change image dynamically through slicer hierarchy

Hello there,   I have seen other posts talk about changing images dynamically with slicers but I haven't seen anyone mention this specific case yet.   I have this sample table "Continent > Countr...
  • AlB's avatar
    3 years ago

    Anonymous 

    That table is not enough.  You will need the image URLs for cities and countries at least.  You can adopt several structures. One of them in the attached file, where you can see it all at work.

    You can create a measure that will yield the desired URL depending on the selection on the slicer. That can then be the input for the visual showing the images

     

    _VisualInput = 
    IF (
        ISFILTERED ( Table1[City] ),
        SELECTEDVALUE ( Table1[City_Image] ),
        IF ( ISFILTERED ( Table1[Country] ), SELECTEDVALUE ( Table1[Country_Image] ) )
    )

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.