If you want to customize tooltips with dynamic images or icons in Power BI, you may proceed in the following order:
Optimizing Conditions for the Images: To begin with, ensure that the images or icons you intend to present within Power BI are stored in a place where they are available to Power BI, such as a Sharepoint Folder, web server, or link. For local file use, they have to first be uploaded in Power BI as image URLs.
Insert the Image URLs in Your Data: The dataset must also comprise images. Add a column to your data with the hyperlinked images to be displayed as you require.
Create a Tooltip Page:
Let's create a new report page with a Tooltip. In the Format pane, navigate to Page Information settings and choose the option Tooltip for page size.
On this page, please also insert any visual ( for example, an image or a card) so that an image related to the data selected will be inserted successfully. You can put a Card visual or an Image visual, depending on what you want to design.
Employ DAX to Change the Image Accordingly: Where an image should vary according to a user's selection, DAX formulas will be necessary to provide the correct image URL. One requirement for such manipulations would be to create a calculated column or a measure that returns the image URL based on the slicers and filters applied.
SelectedImageURL =
SWITCH(TRUE(),
[Category] = "A", "https://example.com/imageA.png",
[Category] = "B", "https://example.com/imageB.png",
"https://example.com/default.png"
)
- Set the Tooltip for the Visual: After creating the tooltip page, link it to your visuals by enabling the "Tooltip" option in the visual settings. In the Format pane, under the "Tooltip" section, select "Report page" and choose the tooltip page you created.
- Test Interactivity: Now, when users hover over visuals, they will see the custom tooltip displaying dynamic images based on their selections.
This setup allows for rich, interactive storytelling where images or icons change based on the data context, enhancing the overall user experience in your Power BI report.