Each PWA entity can be expanded to see the stats:
Then each week or month etc. you can take a snapshot of the data using the Snapshot button, this creates an item on the snapshot list:
The solution starter code has been published for download. The code expects the SharePoint list to already exist but that is covered in this blog post. The solution starter code can be downloaded from the Microsoft Gallery using the link here: https://gallery.technet.microsoft.com/Online-PWA-Stats-and-eb56e6bb
The code does make use of jQuery and jQuery UI, these are loaded from the jQuery CDN but you might want to download them and store them locally etc.:
The code expects a list called PWASnapshot in the root PWA site collection:
This can be updated to a different target list in the root PWA site collection, just change the listTitle variable as seen above. The following columns are required to already exist on the target SharePoint list in the PWA site collection:
They’re all default column settings apart from DateCaptured, this defaults to Today’s Date. If you do not need the snapshot capability, you could just comment out / remove the snapshot button from the code.
Create a new page on the PWA site to display the PWA Stats data, I created a new web part page in a library called “Pauls” in the root PWA site – this is on my test PWA site, hence a library called Pauls!
Update other web part settings as required then click Apply then click OK and stop editing the page.
As the data is loaded, the SharePoint modal dialog will appear:
This will close once all the projects are loaded as on my PWA dataset, the projects data is the largest.
Clicking the snapshot button will also load the SharePoint modal dialog:
This will close when the item is added to the list, then a message will display below the button to state the item has been added:
Trend reports could easily be created using Power BI consuming the snapshot list data to see how the data changes over time.
This could easily be extended to bring in additional PWA stats. I will probably write a blog post in the future to extend this to capture additional PWA stats.
Fully test on a DEV / TEST PWA instance first before using in Production. The script is provided "As is" with no warranties etc.
I hope you find it useful