- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Retrieve attachment from SharePoint online list
Hello,
Please can I know how to import (link) Attachments from Sharepoint list online in Power BI.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you @Greg_Deckler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, a link to a SharePoint list item attachment has the following format:
https://[site url]/Lists/[List Name]/Attachments/[Item ID]/[File Name]
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes but for some reason its just text field not the link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know we're a few years into this post but there's a big difference if you are using the 1.0 version of the SharePoint LIst connector vs the 2.0 Beta version as of the time i'm writing this in January 2022. The 1.0 version let's you do what @Mallev is suggesting; however, the 2.0 Beta version doesn't. It just shows up with an Attachments field that has a value of a 0 or 1. The 2.0 version is so much faster and easier to use. So what I ended up doing was creating two connections. My first uses the 2.0 connection and pulls everything i need EXCEPT for AttachmentFiles, and a 1.0 connection that only pulls the AttachmentFiles and the item ID. Then I merge the two queries on the Item ID. Works pretty good, it's just really slow. I hope they add the capability to the 2.0 connection!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you @Greg_Deckler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot expand the Attachment Files colunm. It says no colunms to show instead of showing the attachment related colunms to select. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works fine for me BUT I have more than one attachment in each row within my SharePoint list. Therefore I get more than one row with duplicated information showing the second/third/forth attacdhments. Is there a way to combine this so that the attachments are on one row?
Thanks in advance!! (",)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous
You have to use the "Implementation 1.0" for your connection, than the "AttachmentFiles" will be shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LisaChai12
I used Mr Mallev method but I am getting on Link icons not the images.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mallev, Awesommmmme solution!!!!!!! Thanks so much for sharing this truly outstanding solution!!!! Now I can access the data and the attachments all from within Power BI!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to display images which are stored in sharepoint as attachments. I am able to retrieve the URL, but when I use an image visualisation, I get a "broken image" icon.
However, if the user is already logged into sharepoint, then the images appear.
How can i get the images to appear without forcing the user to log onto sharepoint (before they run the report)?
I have tried formatting the URL as an image type, this does not work.
Has anyone done this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did this change SiteUrl and listname
let
baseurl = "https://powersul.sharepoint.com/sites/SiteUrl/_api/web/lists/GetByTitle('listname')/",
itemcount = Json.Document(Web.Contents(baseurl & "ItemCount", [Headers=[Accept="application/json"]]))[value],
skiplist = List.Numbers(0, Number.RoundUp(itemcount/5000), 5000),
#"Converted to Table" = Table.FromList(skiplist, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Skip"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Skip", type text}}),
// Adicionando o endpoint para buscar a lista com os anexos
fieldselect = "&$top=5000&$expand=AttachmentFiles",
Custom1 = Table.AddColumn(#"Changed Type", "Items", each Json.Document(Web.Contents(
baseurl & "/items?$skipToken=Paged=TRUE%26p_ID=" & [Skip] & fieldselect,
[Headers=[Accept="application/json"]]
))),
#"Expanded Items" = Table.ExpandRecordColumn(Custom1, "Items", {"value"}, {"value"}),
#"Expanded value" = Table.ExpandListColumn(#"Expanded Items", "value"),
// Expandir os metadados normais
#"value Expandido" = Table.ExpandRecordColumn(#"Expanded value", "value", {
"Id", "Title", "Attachments", "AttachmentFiles"
}, {
"Id", "Title", "HasAttachments", "AttachmentFiles"
}),
// Expandir a coluna AttachmentFiles para obter os detalhes dos anexos
#"Expanded AttachmentFiles" = Table.ExpandListColumn(#"value Expandido", "AttachmentFiles"),
#"Final Expand" = Table.ExpandRecordColumn(#"Expanded AttachmentFiles", "AttachmentFiles", {
"FileName", "ServerRelativeUrl"
}, {
"FileName", "AttachmentUrl"
})
in
#"Final Expand"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
08-07-2024 06:41 PM | |||
01-17-2025 02:49 AM | |||
01-30-2025 05:32 AM | |||
09-18-2024 05:58 AM | |||
11-27-2024 07:50 AM |
User | Count |
---|---|
132 | |
106 | |
85 | |
55 | |
46 |