How to Get SharePoint Document View Counts for Power BI
Question details
The user needs to extract view counts for individual SharePoint documents to generate comprehensive usage reports in Power BI.
- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Building custom Power BI dashboards that require detailed metrics on how often specific files and documents are viewed within a SharePoint environment.
- Observed behavior
- SharePoint does not provide a standard, comprehensive export that contains view counts for every individual document, making it difficult to directly import this data into Power BI.
Ensure you have Site Owner or Administrator permissions in SharePoint to access site usage analytics, and Global Admin or Compliance Admin roles to access Microsoft Purview audit logs.
Export SharePoint Site Usage Reports
Extract view count data for the most popular or recently active files directly from the site's built-in usage analytics to use in Power BI.
This method is best if you only need statistics for the most actively viewed documents on a specific site rather than an exhaustive list of every file in the directory.
Navigate to your SharePoint site, click the gear icon (Settings) in the top-right corner, and select 'Site usage' from the dropdown menu.
Scroll down the analytics page to the 'Popular content' or 'Site files' section to view the metrics for individual documents over the selected time range.
Click the 'Export' button (typically presented as a CSV or Excel download link) to save the usage report to your local machine.
Open Power BI Desktop, click 'Get Data', choose 'Text/CSV' or 'Excel', and import the downloaded report to build your dashboards.

Configure and Export Microsoft Purview Audit Data
Use Microsoft Purview to generate a comprehensive audit log of every document view event, allowing for detailed Power BI reporting.
Boost Your Productivity with WPS Office
While managing complex SharePoint audits and Power BI connections requires advanced administrative tools, editing and organizing your everyday documents doesn't have to be complicated. WPS Office provides a high-performance, cost-effective suite that handles all your documentation needs efficiently.
- 1. Download the Installer: Visit the official WPS Office website and download the free setup file for your operating system.
- 2. Install the Software: Run the downloaded file and follow the straightforward on-screen instructions to complete the installation.
- 3. Start Creating: Open WPS Office and immediately begin working on your documents, spreadsheets, and presentations with ease.

Frequently Asked Questions
Why can't I see the view count for every single file in the standard SharePoint report?
To optimize system performance, SharePoint's default Site Usage reports are designed to only display data for the most popular or recently active files. Generating an exhaustive list of every single file view across an entire site requires querying the central audit logs via Microsoft Purview.
Can file view counts be reset in SharePoint?
Yes. Certain administrative actions, server migrations, or changes to site structure can cause usage metrics and view counts to reset. This is why it is recommended to regularly export your audit data or usage reports if you rely on them for historical Power BI tracking.
Is there a direct API to pull SharePoint view counts into Power BI without exporting CSVs?
Yes, developers can use the Microsoft Graph API to programmatically extract item analytics and usage data. You can set up a custom connector or a script in Power BI to pull this data directly, though it requires advanced technical configuration.




