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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
gemcityzach
Helper IV
Helper IV

Preserve SharePoint List absolute URL in report

Hey folks,

I'm building a report that brings in various fields from a SharePoint list. One of those fields is the URL to the specific SharePoint list record.

 

In the list the record is stored correctly: https://sharepoint.company.com/teams/XXXXXX/stuff/record/form.aspx

However, when importing that URL into PowerQuery it converts it to a Relative URL: /teams/XXXXXX/stuff/record/form.aspx

 

I need the full URL so that I can allow my users to be able to click any record in the PowerBI report and go back to the SharePoint record and form that generated it. Is this possible?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gemcityzach 

You can use this 

= Table.TransformColumns(#"Changed Type", {{"Link_to_record", each if _="" then "https://sharepoint.companyname.com/teams/XXXXX" else "https://sharepoint.companyname.com" & _, type text}})

vjingzhanmsft_0-1719299156686.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @gemcityzach 

 

We can't affect how data is brought from SharePoint List to PowerBI, but you can transform the data with Power Query. As lbendlin suggested, you can add the base URL part as prefix string to the relative URL column. After that, load the data into Power BI Desktop and set the URL column's data category to Web URL, thus the URLs can be clickable in the report. Here is a blog for your reference: 

Add Prefix and Suffix to a Text in Power BI: Generate Country Images and pages - RADACAD

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

lbendlin
Super User
Super User

You can use Power Query to re-inject the missing "https://sharepoint.com" into the string.

This is super helpful. When I use the 'add prefix' it makes for a simple solution but introduces a complexity I'd like to try and resolve.

 

PowerQuery Wants to Do This

{{"Link_to_record", each "https://sharepoint.companyname.com" & _, type text}}

 

And it works great except that our URL's are formatted "https://sharepoint.companyname.com/teams/XXXXX" and the relative URL I am getting from SharePoint is "/teams/XXXXX/......".

 

Not every record will get populated with a value in SharePoint. So, when I do the prefix, it puts a URL "https://sharepoint.companyname.com", which the user will mistakenly click and be sent to an Error 404 page. The same would be true if I tried to add "teams/XXXXX" then while the records with no URL would get a valid URL, then the records that have a URL would get an invalid URL "https://sharepoint.companyname.com/teams/teams/xxxxx/....".

 

Is there a way to use a custom column approach handling the blank URL fields first? Like:


each if [Link_to_record] = "" then "https://sharepoint.companyname.com/teams/XXXXX" else PREFIX the value correctly

Anonymous
Not applicable

Hi @gemcityzach 

You can use this 

= Table.TransformColumns(#"Changed Type", {{"Link_to_record", each if _="" then "https://sharepoint.companyname.com/teams/XXXXX" else "https://sharepoint.companyname.com" & _, type text}})

vjingzhanmsft_0-1719299156686.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

This worked out nicely. Thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.