Forum Discussion

ysapiyev's avatar
ysapiyev
Responsive Resident
8 years ago
Solved

Switch images using slicer

Hi everyone,

 

I have 5 images inserted in my report, and I wanted to switch between them using slicer. Is it possible?

 

Regards

Yerkhan

  • ysapiyev

     

    Depending on the resolution of the image you are trying to add to PBI, converting an image url to base64 encoding might help. The reason is an image's base64 encoding plus the prefix 

    data:image/jpeg;base64

     might require more than 32677 characters which is the limit of each cell  in Power Query (as far as I can remember) .  The text will get truncated beyond this and your image will either not load or just partially. There is a tutorial at https://blog.gbrueckl.at/languages/m/ to do this.  If this doesn't work, then you'll have to make your image accessible via web.

3 Replies

  • Hi ysapiyev

     

    That is possible by using visuals that support images (table, matrix, some custom visuals).

    The data category of the column containing the url to the image should be set as Image URL (you will find this under modelling tab). The URLs must be publicly accessible via web or, if not public, the consumers of your report must have access to them (examples are sharepoint images they have access to. Note: these images are not viewable PBI desktop). 

    • ysapiyev's avatar
      ysapiyev
      Responsive Resident

      danextian

       

      Thanks fot your answer.

       

      What about images available at computer? Also, I have item name with data, I wanted to link every image with appropriate item name and by using slicer for item name choose particular image.

       

      Regards,

      Yerkhan

      • danextian's avatar
        danextian
        Super User

        ysapiyev

         

        Depending on the resolution of the image you are trying to add to PBI, converting an image url to base64 encoding might help. The reason is an image's base64 encoding plus the prefix 

        data:image/jpeg;base64

         might require more than 32677 characters which is the limit of each cell  in Power Query (as far as I can remember) .  The text will get truncated beyond this and your image will either not load or just partially. There is a tutorial at https://blog.gbrueckl.at/languages/m/ to do this.  If this doesn't work, then you'll have to make your image accessible via web.