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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I would like to get the average number of attachment per list item (on a SharePoint online list).
Here is some sample data
Id,AttachmentFiles.ServerRelativeUrl
2,
5,
1,/Attachments/1/1.xlsx
1,/Attachments/1/2.zip
3,/Attachments/3/4.jpg
6,/Attachments/6/2.jpg
6,/Attachments/6/3.pdf
7,/Attachments/7/4.jpg
7,/Attachments/7/5.jpg
7,/Attachments/7/7.jpg
I want to get a result table like this:
| Attachment per item | Count | |
| 0 | 2 | |
| 1 | 1 | |
| 2 | 2 | |
| 3 | 1 |
How can I do it?
Also is it possible to get the file size of SharePoint online from Power BI?
First this: Why you should never attach documents in a SharePoint list - SharePoint Maven
With that out of the way, you will need to call the Sharepoint API with ODATA queries to retrieve this information
Get All Attachments From List Item in SharePoint using REST API - Code SharePoint
I think Content Editor webpart is no longer supported?
Since I don't have permission to develop PowerShell script or SPfx, it seems there is no other way to check the attachment size.
I agree attachment is not good. It is why I want to make a statistic report and asking user to move.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 45 | |
| 42 | |
| 28 | |
| 18 |
| User | Count |
|---|---|
| 199 | |
| 125 | |
| 102 | |
| 69 | |
| 53 |