Forum Discussion
Sharepoint folder not synchronising new files
- 1 year ago
Thankyou, IoannisPhilip, burakkaragoz and Nasif_Azam for your responses.
Hi pasiK,We sincerely appreciate your inquiry posted on the Microsoft Fabric Community Forum.
From my understanding, since the existing files are syncing correctly but the newly added files are not appearing, the issue most likely arises from how Power BI processes the folder structure during refresh. This is especially relevant if you are using SharePoint.Files(), which may cache results and fail to detect new entries.
To resolve this matter, kindly follow the steps outlined below:
-
Use SharePoint.Contents() instead of SharePoint.Files(). This method offers more reliable folder-level navigation and helps avoid metadata caching issues.
a. In Power BI Desktop, please remove the existing SharePoint.Files connection.
b. Use the function SharePoint.Contents("https://yourtenant.sharepoint.com/sites/yoursite"). -
Avoid hardcoding file names or folder paths. Instead, employ dynamic filtering. For example, filter by file extension as demonstrated below:
Table.SelectRows(Source, each Text.EndsWith([Extension], ".csv")) -
Slightly modify the Power Query steps, such as renaming a step temporarily, then save and revert the change. Re-publish the report to Power BI Service. This action may force schema re-evaluation and enable detection of new files.
Additionally, please refer to the following links for more information:
Power Query SharePoint folder connector - Power Query | Microsoft Learn
SharePoint.Contents - PowerQuery M | Microsoft LearnIf you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members who may have similar queries.
Should you have any further questions, please feel free to contact the Microsoft Fabric community.
Thank you.
-
Thankyou, IoannisPhilip, burakkaragoz and Nasif_Azam for your responses.
Hi pasiK,
We sincerely appreciate your inquiry posted on the Microsoft Fabric Community Forum.
From my understanding, since the existing files are syncing correctly but the newly added files are not appearing, the issue most likely arises from how Power BI processes the folder structure during refresh. This is especially relevant if you are using SharePoint.Files(), which may cache results and fail to detect new entries.
To resolve this matter, kindly follow the steps outlined below:
-
Use SharePoint.Contents() instead of SharePoint.Files(). This method offers more reliable folder-level navigation and helps avoid metadata caching issues.
a. In Power BI Desktop, please remove the existing SharePoint.Files connection.
b. Use the function SharePoint.Contents("https://yourtenant.sharepoint.com/sites/yoursite"). -
Avoid hardcoding file names or folder paths. Instead, employ dynamic filtering. For example, filter by file extension as demonstrated below:
Table.SelectRows(Source, each Text.EndsWith([Extension], ".csv")) -
Slightly modify the Power Query steps, such as renaming a step temporarily, then save and revert the change. Re-publish the report to Power BI Service. This action may force schema re-evaluation and enable detection of new files.
Additionally, please refer to the following links for more information:
Power Query SharePoint folder connector - Power Query | Microsoft Learn
SharePoint.Contents - PowerQuery M | Microsoft Learn
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members who may have similar queries.
Should you have any further questions, please feel free to contact the Microsoft Fabric community.
Thank you.
- pasiK1 year agoRegular Visitor
Thank you for your support.
replacing the SharePoint.Files() with SharePoint.Contents() did help the issue and the data set seems to be updating with new files now.
* Only downside was custom colums that were made was removed due to the source change.