
Get ALL SharePoint Sites & Subsites Metrics with Power BI
Christine Payton
Overview
This video demonstrates how to extract SharePoint site and subsite metrics, including views and last modified dates, into Power BI using OData feeds. It highlights the importance of using a service account for data access and explores the structure of OData feeds to identify useful data points. The tutorial walks through creating a Power BI query to gather site information, pivot the data into a usable table, and format it for reporting, including creating clickable links for site paths and categorizing sites as 'site' or 'subsite'. The presenter also previews potential future videos on extracting data about lists, libraries, and activities within SharePoint.
Save this permanently with flashcards, quizzes, and AI chat
Chapters
- SharePoint's backend OData feeds contain valuable data for reporting.
- A technique, shared by Jordan Murphy, allows querying sites and subsites from OData into Power BI.
- This enables tenant-level reporting, which is difficult to achieve through standard SharePoint admin tools.
- The initial step focuses on retrieving a list of all sites, which is crucial for subsequent queries.
- Data extraction requires read permissions on the accessed sites.
- Modern SharePoint often lacks explicit permissions for administrators on all sites, leading to security trimming.
- A dedicated service account with broad read access is recommended for comprehensive tenant-level reporting.
- Service accounts are best practice for data refreshes due to business continuity and security advantages over regular user accounts.
- The OData feed contains extensive information about lists, libraries, recycle bins, and activities.
- Data can be browsed by navigating through the API endpoints in a tool like Power BI's OData connector.
- Specific details like list versions, last modified dates, views, fields, and recycle bin contents are accessible.
- Activity data is available but can be complex to process due to its reliance on item IDs and potential for throttling in large environments.
- Create a parameter for the tenant root URL to easily switch between different reporting scopes (e.g., single site vs. all sites).
- Connect to the OData feed using the root URL and the specific API path for sites and webs (STS_site, STS_web).
- Expand nested 'record' and 'table' structures within the OData response to access raw data.
- Transform the data by converting it to a table, adding an index column, and pivoting the 'key' and 'value' columns to create a structured dataset.
- Filter the dataset to include only relevant fields, removing blank or unnecessary columns.
- Correct data types, especially for date/time fields and numerical views, ensuring accurate calculations.
- Relabel 'content class' to more user-friendly terms like 'Site' or 'Subsite' using conditional columns.
- Filter out unwanted site types such as OneDrive personal sites, publishing hubs, and app catalogs using the 'web template' column.
- Load the cleaned site data into Power BI for visualization.
- Create a table visual displaying key metrics like site title, template, views, and last modified date.
- Configure the 'Path' column as a Web URL data category to enable clickable links within the report.
- Apply conditional formatting to make the site path a clickable hyperlink, allowing direct navigation from the report.
- The current technique focuses on site lists, but functions can be created to query specific data across all sites.
- Future videos will cover extracting data on lists, libraries, and user activities.
- This approach can help identify top-used libraries, monitor activity, and manage list view thresholds.
- The extracted data can be published and scheduled for refresh in Power BI for up-to-date reporting.
Key takeaways
- Leveraging SharePoint's OData feeds in Power BI provides a powerful method for tenant-wide reporting on site metrics.
- A service account with appropriate permissions is crucial for accessing all necessary data without security trimming.
- Understanding the structure of OData feeds allows for the extraction of diverse data points beyond basic site lists.
- Power Query in Power BI is essential for transforming raw OData into a clean, structured, and usable dataset.
- Data cleaning, type correction, and user-friendly relabeling are critical steps for accurate and insightful reporting.
- Configuring fields as Web URLs in Power BI enables interactive reports with clickable links for direct navigation.
- This technique serves as a foundation for more advanced reporting on SharePoint content, activities, and usage patterns.
Key terms
Test your understanding
- What is the primary benefit of using OData feeds in Power BI for SharePoint data?
- Why is it recommended to use a service account instead of a regular user account for accessing SharePoint OData feeds?
- How can you explore the different types of data available within the SharePoint OData feed?
- What steps are involved in transforming the raw OData response into a usable table in Power BI?
- How can you make the site paths in a Power BI report clickable links?