Forum Discussion
PowerBI Desktop Freezes [Not Responding]
I used to encounter lots of performance issues around importing data and folders from SharePoint Online, until I undertook a major optimisation of my Power Query code. I tried to minimise the number of query steps that were generating a refresh of data back to SharePoint. I found that the biggest improvement came from buffering the SharePoint data at the point of pulling the data from SharePoint, like this:
RET =
Table.Buffer(
Table.RenameColumns(
Table.SelectRows(
SharePoint.Files(
"https://" & TENANT_NAME & ".sharepoint.com/",
[ApiVersion = 15]
),
each(
// RET
[Name] = RET_FILE and
Text.Contains([Folder Path], RET_PATH)
)
),
{{"Folder Path", "FolderPath"}}
)
),
Since doing this I've had no issues with SharePoint Online performance.
neatdot please can you do screen on how to insert this code and where to insert them thanks.