Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Srinivas_BI
Regular Visitor

Need help for converting file paths

I Have List fo field paths for each document id Like in the screenshot. My requirment is when i click on the file path the pdf document should be load in the browser. I tried to change  data category as WEB Url but it is working. Please guide me to acheive this.Screenshot 2024-09-02 083844.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Srinivas_BI 

After testing, if your file is a local file, Power BI Desktop provides a link with "file"///your file path", but the link can no longer be opened on Desktop, if you want to open it on the website, you can only copy the link and paste it in the web page.You can refer to the following link.

Solved: Can not hyperlink to file in computer - Microsoft Fabric Community

So, the best way is that you can consider putting these files on your website, for example you can upload the files to SharePoint and then copy the web page link of the file, it can open in Desktop as web url. 

Upload files and folders to a library - Microsoft Support

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Srinivas_BI 

After testing, if your file is a local file, Power BI Desktop provides a link with "file"///your file path", but the link can no longer be opened on Desktop, if you want to open it on the website, you can only copy the link and paste it in the web page.You can refer to the following link.

Solved: Can not hyperlink to file in computer - Microsoft Fabric Community

So, the best way is that you can consider putting these files on your website, for example you can upload the files to SharePoint and then copy the web page link of the file, it can open in Desktop as web url. 

Upload files and folders to a library - Microsoft Support

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

grazitti_sapna
Super User
Super User

Hi @Srinivas_BI 

1. Use Power Query to Transform the File Paths:

  • You can transform the file paths in Power Query to prepend https:// and convert the backslashes (\) to forward slashes (/).

Steps:

  1. Go to Transform Data to open Power Query Editor.
  2. Select the column with the file paths.
  3. Use the Add Column tab to create a Custom Column with the following formula:
    New Path =  "https://" & Text.Replace([FilePath], "\", "/")
  4. This will create a new column with the file paths correctly formatted as URLs.

2. Set the Data Category:

  • After transforming the file paths in Power Query and applying the changes, go back to your report view.
  • Select the new column name New Path in the Fields pane.
  • Go to the Modeling tab and set the Data Category to Web URL.

3.Display the Links in a Table Visual:

  • Add the newly created column to your table visual. This should now display clickable URLs that open the PDFs in a browser.

 

 

The difference between / and \ in URLs is that / is a valid character used to separate directory paths, while \ is generally not allowed and can cause errors.

/ :

\:

  • Purpose: Primarily used as a backslash in programming languages.
  • Usage: Not commonly used in URLs. If used, it might be interpreted as an escape character or cause errors.
  • Example: https://example.com\folder\subfolder\file.html (not recommended)

 

Thank You

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.