Forum Discussion
Display of an Static Image based on PI Chart
Hi,
I have an image that is static and has been added with the image option. I also have a Pi Chart. When I click on a part of the PI Chart (for example: 27%), the image will be displayed. Otherwise it will be hidden. Can anyone tell me whether this is possible with Power BI? If possible, how can I do it?
2 Replies
- dk_dk
Super User
Hi ekramulmostaqui ,
I do not have a solution for hiding a static image, but I do have a workaround:
You can create a table with a single column and row that contains your image URL (Just use "Enter data" - you need to host the image on a website, or use an image that is already available online). Set the data category of the column to Image URL.Then create a measure:
Measure = IF(HASONEFILTER(PieChartTable[PieChartLegend]),"Show","Hide") //you can use ISFILTERED instead of HASONEFILTER depending on the behaviour you want
Add a custom visual: Image by CloudScope. For the image url field get the column from the table you added.add your measure to the visual level filters of the custom visual, and configure Show items when the value is Show.
Your image should disappear, and only reappear when you filter the Pie Chart. Please keep in mind a limitation of this method is that if you have other visuals or filters on the page that are affecting PieChartTable[PieChartLegend], then the image might show even if nothing is highlighted in the specific pie chart visual.
I hope this helps!- ekramulmostaqui
Helper I
Hi dk_dk,
Thank you for your solution. I will take a look if it works for me or not. I will let you know.