Forum Discussion

AnnL's avatar
AnnL
Regular Visitor
9 years ago
Solved

enhanced scatter plot - dynamic backdrop image

The short tutorial for the enhanced scatter plot visual shows that it can be configured to dynamically change the backdrop image using an image measure and a slicer. The details of how to do this are not included. Can someone provide the DAX for the image measure, a view of the corresponding data structure, etc.

 

Thanks,

AnnL


  • AnnL wrote:

    The short tutorial for the enhanced scatter plot visual shows that it can be configured to dynamically change the backdrop image using an image measure and a slicer. The details of how to do this are not included. Can someone provide the DAX for the image measure, a view of the corresponding data structure, etc.

     

    Thanks,

    AnnL


    AnnL

    Based on my test, the dropback field doesn't accept any DAX measure but a table column. One issue I've found in my test is that, if no silcer/filter applied, the dropback seems showing the first image in alphabetical Order, I can't use an DAX measure to overcome this issue, as the field doesn't accpet any measure. So you may have to set any filter by default for the visual to expect it to show the backgroud properly. See more in the attached pbix file.

     

     

    Issue

     

     

  • AnnL's avatar
    AnnL
    9 years ago

    Hi Eric_Zhang,

     

    I did finally get it working based on your example. Thanks very much.

     

    One sticking point I had is that it does not appear to work with images in a local file folder. It only works with images located at a URL.

     

    Also, it seems to have a limit in the URL length. My attempt using the URLs of the images posted to my local SharePoint did not work and I expect it is because the path is very long.

     

    So it worked when I pointed to images out on the web that have short paths, as you had in your example.

     

    Thank you very much,

    Ann

  • AnnL's avatar
    AnnL
    9 years ago

    Hi Ignat,

     

    I did get it working using the method in the example from Eric.

     

    I found limitations - that the images must be pointed to by a URL not a network drive location, and that the URL to the image cannot be too long.

     

    Is there a way to remove these limitations? For example, if the URL could be arbitrarily long, then I could post the images we want to use on the internal SharePoint. Currently the path to any image in our SharePoint is too long.

     

    Thank you for your help,

    AnnL

13 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    AnnL wrote:

    The short tutorial for the enhanced scatter plot visual shows that it can be configured to dynamically change the backdrop image using an image measure and a slicer. The details of how to do this are not included. Can someone provide the DAX for the image measure, a view of the corresponding data structure, etc.

     

    Thanks,

    AnnL


    AnnL

    Based on my test, the dropback field doesn't accept any DAX measure but a table column. One issue I've found in my test is that, if no silcer/filter applied, the dropback seems showing the first image in alphabetical Order, I can't use an DAX measure to overcome this issue, as the field doesn't accpet any measure. So you may have to set any filter by default for the visual to expect it to show the backgroud properly. See more in the attached pbix file.

     

     

    Issue

     

     

    • AnnL's avatar
      AnnL
      Regular Visitor

      Hi Eric,

       

      I downloaded your Power BI file and I think I understand what you did. However, when I tried to extend it to a more complex data set, I cannot get the images to appear. In my data model, I have x and y position data that overlays the image (as in the tutorial), and the data item that switches the image is one of two filters. The filters both work for selecting the data subsets but the corresponding image for the subset does not show. 

       

      Not sure how to attach the pbix file I have been experimenting with. Can I upload the file so that you can take a look for any reason why the images do not work?

       

      Thanks very much,

      AnnL

       

       

      • v-viig's avatar
        v-viig
        Community Champion

        Please upload your .pbix file to any cloud such as One Drive.

         

        Ignat Vilesov,

        Software Engineer

         

        Microsoft Power BI Custom Visuals

        [email protected]

    • AnnL's avatar
      AnnL
      Regular Visitor

      Hi Eric_Zhang,

       

      I did finally get it working based on your example. Thanks very much.

       

      One sticking point I had is that it does not appear to work with images in a local file folder. It only works with images located at a URL.

       

      Also, it seems to have a limit in the URL length. My attempt using the URLs of the images posted to my local SharePoint did not work and I expect it is because the path is very long.

       

      So it worked when I pointed to images out on the web that have short paths, as you had in your example.

       

      Thank you very much,

      Ann