cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mudegowdrp Regular Visitor
Regular Visitor

Retrieve attachment from SharePoint online list

Hello,

 

Please can I know how to import (link) Attachments from Sharepoint list online in Power BI.

 

Thanks

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Super User IV
Super User IV

Re: Retrieve attachment from SharePoint online list

I'm not sure what you mean. If I use that link format, I can get to any attached picture in SharePoint in my browser. Not sure what you are trying to achieve or how you are trying to access it. If you have the SharePoint as a trusted site, you can use URL's in that format to add images to your Power BI Desktop report. Can you explain your use case?


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

mudegowdrp Regular Visitor
Regular Visitor

Re: Retrieve attachment from SharePoint online list

I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you @Greg_Deckler

View solution in original post

Mallev Frequent Visitor
Frequent Visitor

Re: Retrieve attachment from SharePoint online list

I know this is marked as solved, but was one of the first hits on google and did not fit my use case.

I wanted to add a link to an excel file that was attached to a sharepoint list item.

 

1. Open the Query Editor and find the column named AttachmentFiles

2.Expand the table with the double arrow and select ServerRelativeURL. This will give you a new column called AttachmentFiles.ServerRelativeURL

Capture1.PNGCapture2.PNG

3. Add a custom column to concat your Sharepoint URL and the Path  like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]

Capture3.PNG

4. Save and close the Query Editor

5. In the data table view, select the custom column you created and in the modeling tab select Data Category:Web URL

6. Add the custom column to your table visual and in formatting/values select URL Icon true to keep tidy.

 

 

 

 

 

View solution in original post

11 REPLIES 11
Super User IV
Super User IV

Re: Retrieve attachment from SharePoint online list

You can import list items from SharePoint but not attachments to the best of my knowledge, unless you write your own custom connector. If you could get a URL to the attachment itself, maybe. Are you trying to import something like Excel files attached to SharePoint list items?

 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

mudegowdrp Regular Visitor
Regular Visitor

Re: Retrieve attachment from SharePoint online list

Thank you for responding @Greg_Deckler

 

Yes, I am trying to retrieve image file (.PNG) attached to list items. Its fine if I can attach link to that image file.

 

 

Super User IV
Super User IV

Re: Retrieve attachment from SharePoint online list

Well, a link to a SharePoint list item attachment has the following format:

 

https://[site url]/Lists/[List Name]/Attachments/[Item ID]/[File Name]

 

 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

mudegowdrp Regular Visitor
Regular Visitor

Re: Retrieve attachment from SharePoint online list

Yes but for some reason its just text field not the link.

Super User IV
Super User IV

Re: Retrieve attachment from SharePoint online list

I'm not sure what you mean. If I use that link format, I can get to any attached picture in SharePoint in my browser. Not sure what you are trying to achieve or how you are trying to access it. If you have the SharePoint as a trusted site, you can use URL's in that format to add images to your Power BI Desktop report. Can you explain your use case?


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

mudegowdrp Regular Visitor
Regular Visitor

Re: Retrieve attachment from SharePoint online list

I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you @Greg_Deckler

View solution in original post

Mallev Frequent Visitor
Frequent Visitor

Re: Retrieve attachment from SharePoint online list

I know this is marked as solved, but was one of the first hits on google and did not fit my use case.

I wanted to add a link to an excel file that was attached to a sharepoint list item.

 

1. Open the Query Editor and find the column named AttachmentFiles

2.Expand the table with the double arrow and select ServerRelativeURL. This will give you a new column called AttachmentFiles.ServerRelativeURL

Capture1.PNGCapture2.PNG

3. Add a custom column to concat your Sharepoint URL and the Path  like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]

Capture3.PNG

4. Save and close the Query Editor

5. In the data table view, select the custom column you created and in the modeling tab select Data Category:Web URL

6. Add the custom column to your table visual and in formatting/values select URL Icon true to keep tidy.

 

 

 

 

 

View solution in original post

Highlighted
mudegowdrp Regular Visitor
Regular Visitor

Re: Retrieve attachment from SharePoint online list

Thank you @Mallev 

lidderdj Frequent Visitor
Frequent Visitor

Re: Retrieve attachment from SharePoint online list

Hi, 

 

I'm currently using this solution and it looks great. However, since explanding the table and extracting the link the list item, the Power BI file it increadibly slow to update from the server. When I click "Close and Apply" to exit the query editor, the Apply Query Changes window appears but the data download rate is in the order of 1mb/min. For refernce, it is usually ~100 mb/min. 

 

Do you have any suggestions on what might be causing this behaviour? 


Thanks in advance,

Daniel 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors