Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Power BI Desktop and Power BI service
Store image files and shape map files in Microsoft OneLake when you want to use authenticated files in Power BI reports. Power BI uses each report viewer's Microsoft Entra identity to load OneLake files. The files don't need anonymous access, but each viewer needs permission to read them.
This article shows you how to upload files to a lakehouse, copy a file URL, and use the URL in a report.
Prerequisites
- A Microsoft Fabric workspace where you can create a lakehouse and upload files.
- Power BI Desktop or permission to edit a report in the Power BI service.
- To configure viewer access, a workspace Admin or Member role, or assistance from someone with one of these roles.
Upload images to OneLake
A lakehouse provides a Files area for storing images and other unstructured files in OneLake.
- Create a lakehouse in your Fabric workspace.
- Open the lakehouse, and then expand Files in the Lakehouse explorer.
- Open the context menu for Files or a folder, and then select Upload > Upload files.
- Select the image files, and then select Upload.
You can also upload images with OneLake file explorer. Drag files from a local folder into the lakehouse Files folder in Windows File Explorer.
Copy the OneLake file URL
Copy the URL for each image that you want to use in a report.
- In the Lakehouse explorer, locate the image under Files.
- Open the image file's context menu, and then select Properties.
- In the Properties pane, copy the URL value.
The URL uses the OneLake HTTPS format. For example:
https://onelake.dfs.fabric.microsoft.com/<workspace-guid>/<item-guid>/Files/<path>/<file-name>
For more information about OneLake paths, see OneLake URI syntax.
Add the URL to a report
How you add the URL depends on whether the report uses one image or selects images based on data.
Enter a URL in the format pane
Use this method when a visual displays one image.
- Select a visual that supports an image URL, such as an image or card visual.
- In the Format visual pane, open the settings for the image.
- For the image source, select Enter URL.
- Paste the OneLake file URL.
The location and name of the image settings vary by visual. For an example, see Create an image visual.
Use an image URL column
Use a column when each row or category can display a different image.
- Add the OneLake file URLs to a column in your source data.
- In Power BI Desktop, open Table view and select the column.
- On the Column tools tab, set Data category to Image URL.
- Add the column to a visual that supports images from data.
For more information, see Specify data categories in Power BI Desktop and Display images in a table, matrix, or slicer.
Use an image URL measure
Use a Data Analysis Expressions (DAX) measure when the image URL must respond to the report's filter context. The following example returns one OneLake file URL:
Image URL = "https://onelake.dfs.fabric.microsoft.com/<workspace-guid>/<item-guid>/Files/<path>/<file-name>"
- Create a measure that returns the OneLake file URL.
- Select the measure, and then open the Measure tools tab.
- Set Data category to Image URL.
- Add the measure to a visual or use it as the field for an image setting.
For more information about creating measures, see Create measures for data analysis in Power BI Desktop.
Use OneLake images in visuals
You can use OneLake image URLs in these report scenarios:
- Image visuals: Enter a URL or bind the image to a column or measure. For more information, see Create an image visual.
- Card visuals: Use an image URL for an image, callout image, or category header background. For more information, see Create a card visual.
- Tables, matrices, slicers, and multi-row cards: Add a column categorized as Image URL. For more information, see Display images in a table, matrix, or slicer.
- Conditional formatting: Use an image URL column for custom table or matrix icons. For more information, see Use a custom icon from a URL.
- Azure Maps marker layers: Use a URL to an SVG file for one marker image, or bind an image URL field to markers. For more information, see Add a marker layer to an Azure Maps Power BI visual.
- Shape map custom maps: Reference a TopoJSON or GeoJSON file in OneLake as the custom map source. For more information, see Add a map from URL.
Other scenarios might exist because visuals continue to add support for image URLs. Check the documentation for the visual that you want to use to confirm whether it accepts an image URL.
Give report viewers access
Report viewers can see a OneLake image only when they have access to the report and read access to the image file in OneLake. Access to the report or semantic model doesn't automatically grant access to the file.
Grant each viewer Read permission on the lakehouse item. Then grant OneLake security Read permission on the folder that contains the image. Alternatively, grant ReadAll permission on the lakehouse item to provide access to all content under Tables and Files. Follow the principle of least privilege and grant access only to the folders that viewers need.
For details, see OneLake security access control model and Best practices for OneLake security.
Considerations
- Power BI supports BMP, JPG, JPEG, GIF, PNG, and SVG image URLs. Azure Maps marker images require SVG files.
- Moving or renaming a file changes its path. Update the URL in the report or semantic model after either change.
- Large images can increase the time required to render a report page. Use image dimensions and file sizes that are appropriate for the visual.
- OneLake URLs require authentication. Report viewers who don't have permission to read a file don't see its image.
- Publish to web and other anonymous embed scenarios don't support OneLake file URLs because those scenarios can't authenticate to OneLake.
- Deployment pipelines don't rewrite OneLake image URLs. A report deployed to a new stage continues to reference files in the original workspace. To point to images in the target stage, use parameters or update the URLs after deployment.