This is last post in this mini series for the last connect / last logon feature for Project Online, Microsoft’s PPM tool. In this post we will create the Power BI report. For those that missed the previous post see the links below, check these out first:
Firstly, capturing the last logon time: https://pwmather.wordpress.com/2016/09/30/want-to-capture-the-last-logon-time-for-the-projectonline-pwa-users-ppm-javascript-office365-sharepoint/
Secondly, part 1 of the report creation – setting up the dataset queries in preparation for this post: https://pwmather.wordpress.com/2016/10/10/last-logon-time-for-the-projectonline-pwa-users-report-ppm-powerbi-powerquery-office365-sharepoint-bi-part-1/
If you are continuing where we left off after part 1, open the saved Power BI report:
![image image]()
We have the blank canvas ready to add the data and visualisations. In the blog post we I cover creating the report below, Power BI has many options which we don’t cover here but all are intuitive so have a play!
Page 1 – PWAUsage:
![image image]()
Page 2 – PWAUserLastConnectDate:
![image image]()
Before we start, the report example I created uses a custom visual from the gallery for the Browser filter, this can be downloaded here: https://app.powerbi.com/visuals/show/ChicletSlicer1448559807354 or alternatively just use the default slicer visual like the one used for the Username filter.
Once the custom visual is imported (or choose to use the default slicer), expand the PWAUage dataset, this is the one we will use for this first page:
![image image]()
The first visual we will add is the bottom left pie chart for “Logon by Browser”, from the PWAUsage dataset select Browser and Id:
![image image]()
It defaults to the Table visualisation, change this to the Pie chart in the Visualizations pane:
![image image]()
Drag Id from Details into Values:
![image image]()
Drag the visual to the bottom left corner of the page. In the Visualizations settings pane, click the roller to access the settings, here you can change the settings as needed, for example I turned on the Legend and update the Title:
![image image]()
The next visualisation to add is the PWA Usage Details table, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Browser, Logon Data and Username:
![image image]()
By default, the Logon Date will be broken down into the date hierarchy, change this in the visualisation settings, select Logon Date:
![image image]()
Move the visualisation to the bottom center of the page and click the Logon Date column to change the order by so the latest date is in the first row:
![image image]()
With the visualisation selected, click the roller in the visualisations settings pane to update the settings as needed. I updated the title, the grid settings, the text size for the data and changed the column order:
![image image]()
The next visualisation to add is the Hits Per User bar chart, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Browser, Id and Username:
![image image]()
Change the visualisations from a table to a Stacked bar chart and move Id to Values and Browser to the Legend:
![image image]()
Move the visualisation to the center of the page and extend it to the right hand side of the page by dragging it:
![image image]()
The same process as before, update the visualisation settings as required by clicking the roller. I updated title, increased the size of the legend text and turned on data labels.
The next visualisation to add is the Last Refresh table, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Last Refreshed, resize the visualisation and move it to the top right hand corner of the page:
![image image]()
Update the visualisation settings as required by clicking the roller. I added a title and increased the size of the data text:
![image image]()
Add a text box to the top of the page and enter the report title, change the settings as required:
![image image]()
The next visualisations to add are the cards showing the totals, the process is the same for all so I will only cover adding one in detail. Click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Id, change the visual from a table to a Card:
![image image]()
Move the visual to the bottom right corner of the page, resize it and update the settings as required, I added a title, removed the category label and increased the size of the data label:
![image image]()
Add 5 more cards, select the one already created then copy and paste it 5 times then place them in the correct location on the page as required:
![image image]()
The 5 additional visualisations need different settings applied as these will show the hits per Browser. To update them, select one so that the settings are visible. Drag Browser from the PWAUsage dataset to the Visual level filters setting:
![image image]()
Select IE:
![image image]()
Now update the title from Total Hits to Total IE Hits:
![image image]()
Repeat this for the other 4 cards but set one for Chrome, Edge, Firefox and Other so you end up with this:
![image image]()
The final visualisations to add to this page are the filters, with no visualisation selected, select Username from the PWAUsage dataset, change this from a table to a slicer and change the settings as required. I added a title, turned off the header row, turned of Select all and turned off single select:
![image image]()
Now repeat this but select Browser and change it to the Chiclet Slicer:
![image image]()
Change the settings as required, I added a title, turned off the header row and set it to have 2 columns:
![image image]()
That is the first page set up, rename the page and it is completed:
![image image]()
So here you can see some useful stats around the PWA usage.
Click the + next to the first page to add a new page and rename this to PWAUserLastConnectDate:
![image image]()
Now expand the PWALastLogon dataset and select both fields, change the column order so Resource name is first then change the row order so the Resource Name is alphabetical:
![image image]()
Change the settings as needed, I added a title, turned off the horizontal grid line and increased the text size. Now add a text box to the page to add the report title:
![image image]()
On this page you can quickly see who has logged in and when plus who has never logged in since adding the JavaScript to the Project Web App homepage – unless of course they always by pass the PWA homepage or the pages where you added the JavaScript!
There are lots of options available, have a play and build great dashboards! If you used the Chiclet slicer here is a cool option to add:
![image image]()
It supports Image URLs, for this I updated the PWAUsage dataset and added a new column called Browser URL:
![image image]()
As you can see this is an if statement, based on the Browser a certain URL is set to display the correct logo for each browser, either save the images to a site you have access to or use images from the internet. Then on the report designer I set the Browser URL to be an Image URL on the Modelling tab:
![image image]()
Then update the Chiclet Slicer settings:
![image image]()
Once completed save and publish your report to Power BI or you can just use it from Power BI Desktop if needed.
Power BI offers great report visualisations, this is just a simple example, see what you can come up with!