Forum Discussion
Retrieve attachment from SharePoint online list
- 8 years ago
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?
- 8 years ago
I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you Greg_Deckler
- 8 years ago
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
3. Add a custom column to concat your Sharepoint URL and the Path like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]
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.
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 tried few ways to do that. Best way is to have a llink and it works as you told. Thank you Greg_Deckler
- Mallev8 years agoAdvocate I
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
3. Add a custom column to concat your Sharepoint URL and the Path like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]
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.
- lidderdj8 years agoFrequent Visitor
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
- MuhamadIlhamsya2 years agoFrequent Visitor
I Also had the same problem here, whenever i use the serverrelativeurl table for attachment it would slow down the query load like only 30Kb/s
is there anyone had a trick to solve this??
- LisaChai126 years agoFrequent Visitor
Hi Mallev,
I would like to display image from sharepoint attachment in Power Bi. I tried your method. i don't understand the last step.
6. Add the custom column to your table visual and in formatting/values select URL Icon true to keep tidy.
Could you tell me where to select URL Icon true?
if I change to data category to imageURL, it will show broken files.
i hope your method can solve my problem.
Thank you.
Lisa
- MH33 years agoHelper V
Hi LisaChai12
I used Mr Mallev method but I am getting on Link icons not the images.
- Anonymous4 years agoNot applicable
Hi,
Sorry I realise this is an ancient post but I've looked everywhere for the "Attachmentfiles" column and I can't seem to find it. All I have is a column called "Attachments" when viewed in SP it displays the paper clip and if you click on the list items the attachments are there.
however in powerbi it just shows a number 1 (not even reflective of the actual number of attachments) and it is not expandable.
Any help would be appreciated.
- German_Chris3 years agoNew Member
Anonymous
You have to use the "Implementation 1.0" for your connection, than the "AttachmentFiles" will be shown.