Change required for #SharePoint Online / #ProjectOnline REST API calls when using WebRequest #PowerShell #dotnet #office365dev

May 9, 2018 at 7:00 am | Posted in .Net, Administration, Customisation, Functionality, Information, Issue, PowerShell | 2 Comments
Tags: , , , ,

Just a quick blog post to highlight a change the is required when querying Project Online / SharePoint Online REST APIs in code when using the WebRequest class. Previously the PowerShell code sample below would work and authenticate with no issues:

#add SharePoint Online DLL - update the location if required
$programFiles = [environment]::getfolderpath("programfiles")
add-type -Path $programFiles'\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll'

#set the environment details
$PWAInstanceURL = "https://PWAURL"
$username = "username" 
$password = "password"
$securePass = ConvertTo-SecureString $password -AsPlainText -Force

#set the Odata URL with the correct project fields needed,
$url = $PWAInstanceURL + "/_api/ProjectData/Projects()?`$Filter=ProjectType ne 7&`$Select=ProjectId,ProjectName,ProjectPercentCompleted,ProjectOwnerName"

#get all of the data from the OData URL
[Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)  
$webrequest = [System.Net.WebRequest]::Create($url)
$webrequest.Credentials = $spocreds
$webrequest.Accept = "application/json;odata=verbose"
$webrequest.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$response = $webrequest.GetResponse()
$reader = New-Object System.IO.StreamReader $response.GetResponseStream()
$data = $reader.ReadToEnd()
$results = ConvertFrom-Json -InputObject $data
$results.d.results 

There has been a change in Office365 and this would now generate a 401 unauthorized error as seen below:

image

It is now required to use the authentication cookie, not sure if this is a permanent change or a temporary issue. Adding the line below resolves the issue:

$webrequest.Headers["Cookie"] = $spocreds.GetAuthenticationCookie($url)

#get all of the data from the OData URL
[Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)  
$webrequest = [System.Net.WebRequest]::Create($url)
$webrequest.Credentials = $spocreds
$webrequest.Accept = "application/json;odata=verbose"
$webrequest.Headers["Cookie"] = $spocreds.GetAuthenticationCookie($url)
$webrequest.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$response = $webrequest.GetResponse()

This change would be applicable to all of my PowerShell code samples that query the Project Online OData API found here: https://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=User&f%5B0%5D.Value=PWMather&sortBy=Date

Hope that helps

Advertisements

#ProjectOnline #PowerShell to keep #PPM data in sync on #SharePoint list #PMOT #O365

March 1, 2018 at 1:38 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information | 1 Comment
Tags: , , , , ,

Following on from my two PowerApps posts on creating an example Project Online PowerApps app, I thought I would publish the example PowerShell script that I used to populate and update my SharePoint list in the Project Web App site collection. For those that missed my Project Online PowerApps posts, please find the links below:

https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

https://pwmather.wordpress.com/2018/02/24/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-sharepoint-part2/

The script sample can be downloaded from the Microsoft Script Gallery here: https://gallery.technet.microsoft.com/Keep-Online-data-in-sync-06a1bf8d

This PowerShell script will use the Project Reporting OData API to get all of the published projects in the Project Online PWA Site Collection, then for each project it will then create or update a list item on the specified SharePoint list. If the project has already been created on the SharePoint list on a previous run, the items will be updated rather than creating a new item.The user setting up the script will need to make some changes to the script, this is covered in the blog post.

The account used will need access to the OData API in PWA and contribute access to the target SharePoint list. The SharePoint list will also need to be created beforehand with the required columns.

To get the script to work you will need to reference the DLL as seen in the image below:

image

This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Firstly decide what project level fields you want to include in your PowerApp / SharePoint list, this will determine the list column requirements. Then create the SharePoint list in the PWA site collection with the required columns, for this example I created a list called ProjectData with the columns below:

image

Title is used for my Project Names in this example. You will then need to update the list item update / creation part of the sample script to map to the correct SharePoint column names you created and the project fields:

image

Also ensure the variables have been updated correctly, placeholder values seen below:

image

Save and run the PowerShell script (fully test on a non-production PWA site collection before Production) to ensure the data is captured correctly in the target SharePoint list. This script could be run manually on demand or on schedule using a scheduled task if running on a server or a scheduled Azure Function or other methods. This script could also be updated to work based on the project publish event using a combination of Flow / Logic App and an Azure Function based on previous examples I have blogged: https://pwmather.wordpress.com/2017/08/01/running-projectonline-powershell-in-azure-using-azurefunctions-ppm-cloud-flow-logicapp-part2/

Whilst the purpose of this script was to enable us to get the data into a SharePoint list and keep the data in sync for our PowerApp, it can be used for other purposes. For example, you could use this example script to modified the last script I published for HTLM fields to update existing items rather than creating new items each run. Do keep in mind that this SharePoint list would not be security trimmed like a Project Center view though, so you might want to restrict access to the SharePoint list depending on your data / security policies for your PPM data.

The script is provided "As is" with no warranties etc.

#ProjectOnline #PowerApps example #Office365 #PPM #PMOT #Apps #MSProject #SharePoint Part2

February 24, 2018 at 10:17 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information, Mobile | 2 Comments
Tags: , , , , ,

In part 2 of this series we look at continuing with the example PowerApp for Project Online for project details and project navigation. For those of you that missed part 1, a link to the post can be found below:

https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

In part 2 we will update the detail screen to display the data we want and include links to PWA for the associated project. If you are following, open the app you started in part 1:

image

Using the tree view on the left, click DetailScreen1 to load the detail screen or click the chevron next to a project from the browse screen:

SNAGHTMLad72abf

Firstly I updated the screen label to “Project Details” and deleted the delete and edit icons:

SNAGHTMLadf40c1

Next two buttons were added to the top bar, one for the Site and one for the Tasks. The Site button will launch DataCardValue8 which in my case is the Project Site URL as seen below:

SNAGHTMLaf5ceae

The Tasks button will launch the Project Schedule PDP but concatenating the PWA URL for the schedule PDP (or whatever PDP you want to link to) then using the ProjectID, in my case DataCardValue2, from the detail screen for the projuid URL parameter:

SNAGHTMLafa7b75

The buttons were added to the screen using the insert menu:

image

As you can see, there are lots of options on the insert ribbon! Other quick links could easily be added such as Issues, Risks, New Risk etc. That is it for the detail view, we have some project details and two buttons that link out to PWA for the associated project:

SNAGHTMLb051b8d

Just for fun I also added a new screen in for a chart. I inserted a bar chart and created a project count by progress chart:

image

For the Items, I entered the following formula to count the number of projects Completed, Not Starter or In Progress:

image

The formula is below for my data, ProjectData is the name of my SharePoint list and Progress is the column on my SharePoint list that contains the % complete value for each project:

Table(
    {Column: "Completed", Value: CountIf(ProjectData, Progress = 100)
    },
    {Column: "Not Started", Value: CountIf(ProjectData, Progress = 0)
    },
    {Column: "In Progress", Value: CountIf(ProjectData, Progress <> 0 && Progress <> 100)
    }
)

Then set the item colours:

image

I then added the back arrow to navigate back to the main browse screen:

image

The final change was to add an icon to the main browse screen that enabled navigation to the chart screen:

image

To preview your app in PowerApps, press F5:

Main screen: list of projects with search and sort using project name, link for each project to project detail screen, access to chart screen, refresh the data and link to create a new project in Project Online

image

Details screen: project details with button links to the project site or schedule PDP in Project Online PWA and a back button to the main screen

SNAGHTMLb7913d8

Chart screen: bar chart display project count by progress for Completed, Not Started and In Progress with a back button to the main screen

image

Once you are happy with your app you can share it to your organisation. Before you do, access the App Settings view and give it a name, set the icon and description:

image 

Then click Save and save it to your organisations PowerApps environment then share the app:

SNAGHTMLb8e0f8c

For details on Saving, publishing and sharing your apps see the links here: https://docs.microsoft.com/en-us/powerapps/save-publish-app & https://docs.microsoft.com/en-us/powerapps/share-app Users can then access your app using the browser, PowerApps Studio or the PowerApps mobile app!

Hopefully that has given you enough to get started or given you some ideas for Project Online PowerApps. There are so many features to PowerApps, they are very powerful! For getting started guides on PowerApps start here: https://docs.microsoft.com/en-us/powerapps/getting-started

Have fun!

#ProjectOnline Project level #HTML fields to a #SharePoint list #PowerShell #PPM #Office365

January 27, 2018 at 10:01 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell, Reporting | 2 Comments
Tags: , , , ,

Following on from my previous mini series of posts for including the HTML formatting in Project Online Power BI reports, this post is a supporting blog post for the PowerShell script I used in the 3rd post. For those that missed that mini series of posts, the links are below:

Part 1: https://pwmather.wordpress.com/2018/01/01/projectonline-powerbi-report-include-html-formatting-ppm-pmot-powerquery-odata-rest-part-1/

Part 2: https://pwmather.wordpress.com/2018/01/03/projectonline-powerbi-report-include-html-formatting-ppm-pmot-powerquery-odata-rest-part-2/

Part 3: https://pwmather.wordpress.com/2018/01/16/projectonline-powerbi-report-include-html-formatting-ppm-pmot-powerquery-odata-rest-part-3/

This blog post is the supporting blog post for the script sample published to the Microsoft Script Gallery: https://gallery.technet.microsoft.com/Online-Level-HTML-fields-5dc31a38

This PowerShell script will use the Project Reporting OData API to get all of the published projects in the Project Online PWA Site Collection, then for each project it will get the project level multiple lines of text fields that include the HTML from the REST API and then create a list item on the specified SharePoint list. The user setting up the script will need to make some changes to the script , this is covered in the blog post.

The account used will need access to the OData API in PWA, at least full read access to all projects and contribute access to the target SharePoint list. The SharePoint list will also need to be created beforehand with the required columns.

To get the script to work you will need to reference the DLL as seen in the image below:

image

This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Firstly decide what project level multiple lines of text fields you want to include, this will determine the list column requirements. Then create the SharePoint list in the PWA site collection with the required columns, for this example I created a list called ProjectMutliLineFields with the columns below:

image

I used the default Title field for the Project Name, ProjectId for the Project GUID then I created four multiple lines of text columns for my example project multiple lines of text fields. Set up the list and columns as required then update line 45 in the sample script to change the select query to include the correct project fields you need:

$url = $PWAInstanceURL + "/_api/ProjectServer/Projects(guid'$projectID')/IncludeCustomFields?`$Select=Name,Id,Custom_x005f_4d0daaaba6ade21193f900155d153dd4,Custom_x005f_3f9c814ca2ade21193f900155d153dd4,Custom_x005f_a801708ea5ade21193f900155d153dd4,Custom_x005f_70534c6aa2ade21193f900155d153dd4"

You will at least need to change all of the custom field GUIDs to be the correct GUIDs for your project fields. If you are unsure on how to get the correct custom field GUIDs, see post 2 in the HTML reporting series.

You will then need to update the list item creation part of the sample script to map to the correct SharePoint column names you created and the project fields:

image

Also ensure the variables have been updated correctly, placeholder values seen below:

image

Save and run the PowerShell script (fully test on a non-production PWA site collection before Production) to ensure the data is captured correctly in the target SharePoint list. This script could be run manually on demand or on schedule using a scheduled task if running on a server or a scheduled Azure Function or other methods.

Once the script is run you will see the data in the SharePoint list (data from our sales demo instance):

image

Whilst the purpose of this script was to enable us to get the data easily in Power BI in a such a way that supported refreshing in the Power BI Service, as you can see in the screen shot above, this list includes all of the HTML formatting in a central view – something you can’t get in a PWA Project Center view! Do keep in mind that this SharePoint list would not be security trimmed like a Project Center view though, so you might want to restrict access to the SharePoint list depending on your data / security policies for your PPM data.

Running the script multiple times will create multiple items for each project so you might want to set up grouping on the view or update the script to modify the SharePoint list item with the updated data so that you only have one list item per project.

The script is provided "As is" with no warranties etc.

#SharePoint item count from all lists on all sub webs in SharePoint / #ProjectOnline #PPM #PowerShell

September 28, 2017 at 11:29 am | Posted in Add-on, Administration, Customisation, Functionality, Information, PowerShell, Reporting | Comments Off on #SharePoint item count from all lists on all sub webs in SharePoint / #ProjectOnline #PPM #PowerShell
Tags: , , , ,

This is a supporting blog post for an example PowerShell script I quickly wrote for Microsoft’s Office 365 SharePoint Online. It was created after a query was posted on the Project Online TechNet forums asking how to easily check what sub sites were being used in PWA.

The code sample can be downloaded from here: https://gallery.technet.microsoft.com/Get-item-count-from-all-026a6db2

To get the script to work, there will need to be some environment variables set and a DLL available, these are detailed below.

Update the environment details:

image

Add the SharePoint Online / PWA URL, username and password for an account that is a site collection admin on the target site collection.

To get the script to work you will need to reference the DLL as seen in the image below:

image

This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Below you can see the output from the PowerShell ISE when running against my test SharePoint / Project Online site collection:

SNAGHTML9ae65556

There are probably easier ways to view this information but I thought I would just try with a simple PowerShell script.

Update for script to report across #ProjectOnline Project Sites for #SharePoint list data #PPM #JavaScript #Office365 #REST #OData

June 3, 2017 at 8:58 pm | Posted in Configuration, Customisation, Fixes, Functionality, Information, Reporting | Comments Off on Update for script to report across #ProjectOnline Project Sites for #SharePoint list data #PPM #JavaScript #Office365 #REST #OData
Tags: , , , ,

I have made a quick change to the example solution starter script to fix a common encoding issue with the EPT names. For example, if your EPT name is “R & D”, the original example solution starter script wouldn’t handle this when querying the Project OData API. It would pass in R & D when querying the OData API but the OData API call fails as it should use R %26 D. I have updated the solution starter code to handle this and encode the EPT name before querying the Project OData API. The solution starter code can be downloaded here:

https://gallery.technet.microsoft.com/Report-on-Online-list-data-f5cbf73f

If you didn’t seen the original post or solution start script before, see the post below:

https://pwmather.wordpress.com/2017/05/05/want-to-report-across-projectonline-project-sites-for-sharepoint-list-data-ppm-javascript-office365-rest-odata/

This script is still a solution starter and should be updated for production use to include the correct data you want, improve error handling, support the REST API pagination, split out HTML, CSS and JavaScript etc.

Want to report across #ProjectOnline Project Sites for #SharePoint list data? #PPM #JavaScript #Office365 #REST #OData

May 5, 2017 at 5:13 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Reporting | 5 Comments
Tags: , , , ,

For those of you that are familiar with Project Server or Project Online, only the default lists and default columns from those lists are synchronised to the database reporting schema. So Project API’s like the OData API (_api/ProjectData) only have data for Risks / Issues and the default columns etc. I have published an example solution starter script that will allow data from any list on the project site to be used.

This is a supporting blog post for the JavaScript solution starter I have published to the Microsoft Gallery, it can be downloaded here:

https://gallery.technet.microsoft.com/Report-on-Online-list-data-f5cbf73f

This solution starter should be updated before production use to include the correct data you want, improve error handling, support the REST API pagination etc. This example uses the Issues list and some example default columns from the Issues list but it can easily be updated to use a custom list on the Project Sites.

There are comments in the script to help update the script for your target Project Site list and columns. Once the script is updated, upload it to a library on the target PWA site. Create a new page on the PWA site to host the JavaScript file. Then add a content editor web part on the new page and reference the JavaScript file, for example:

image

Once added it will look like this (this in on one of my MOD demo tenants):

image

The select menu will contain a list of EPTs:

image

Changing the selection to another EPT will load a SharePoint modal pop up whilst the data loads:

image

If an EPT is selected that doesn’t contain any list items the following will be displayed:

image

There is example conditional formatting on the table:

image

The list item title is a clickable hyper link that will open the list item in a new window:

image

Fully test this on a non-production PWA instance before using in Production, the script is provided As Is with no warranties etc. Try it out and let me know what you think.

Update #ProjectOnline Resource custom field values using #PowerShell with data from #AzureAD user attributes #PPM #Offce365 #ProjectServer #CSOM

November 7, 2016 at 9:40 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell, Reporting | Comments Off on Update #ProjectOnline Resource custom field values using #PowerShell with data from #AzureAD user attributes #PPM #Offce365 #ProjectServer #CSOM
Tags: , , , , , , , ,

This blog post will demonstrate a simple example of how Microsoft’s PPM tool, Project Online, can include / sync metadata from Azure AD user attributes to resource custom fields in Project Online. This example script will update the resource custom field “Job Title” on my test tenant with the data from the Azure AD user “Title” attribute.

This script example can be downloaded here: https://gallery.technet.microsoft.com/Update-Online-Resource-83137b7f

The script does require some additional modules / DLLs to work. Firstly you will need the Azure AD module installed, this can be downloaded here: http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185. You will also need the SharePoint Online and Project Online CSOM DLLs. The DLL’s used are from the NuGet package here: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.5521.1200. There are later version available, check here: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM. Download those as required. These modules can be seen here on line 3,5 and 14 in the example script, the location will need to be updated to reference the correct location for your SP / PS Online CSOM DLLs.

The user setting up the script will need to update the correct location to the DLLs required, the AD username, AD password, CSV file location, PWA instance URL, username, password and the custom field internal name. The PWA account specified will need edit access to all of the resources in PWA and the AD account will need access to read all the users in Azure AD. Ensure the variables have been updated correctly, placeholder values seen below:

image_thumb.png

In this example all users in the Azure AD will be exported, clearly if you have a large organisation it would be efficient the filter for only those users that exist in Project Online. The code matches users and resources based on the AD display name and PWA resource name when updating the resources in PWA.

To get the correct custom field internal ID I use the REST API, <PWA Site URL> + /_api/ProjectServer/CustomFields. Find the resource level custom field and copy the InternalName as seen below:

image_thumb.png

Once the PowerShell script has been updated, save it and it can then be tested on a test / non-production environment. Once executed in PowerShell, each resource found in the CSV file will be outputted as seen in the example below. In this example there are many AD users in the CSV export that do not exist in the PWA instance.

image_thumb.png

Checking in the Resource Center after the script has run you can see for the resources that exist in the CSV file created, the Job Title has been updated with the values found in Azure AD / the export CSV file:

image_thumb.png

The CSV file generated can be seen here:

image_thumb.png

This PowerShell script could be run on a schedule from a server on-prem or even in Azure / webjob. The script would just need access to save / access a CSV file and the DLLs / modules required. Fully test this script on a test / non-production PWA instance before running on a Production PWA instance.

The script is provided “As is” with no warranties etc.

Update #ProjectOnline Project custom field values using #PowerShell with data from a CSV file #PPM #ProjectServer #CSOM

November 6, 2016 at 4:44 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell | 1 Comment
Tags: , , , , , , , ,

This blog post will demonstrate a simple example of how Microsoft’s PPM tool, Project Online, can include data from an external system. This is a very simple example using a demo CSV mock up of data that could be from an external system. The CSV part could easily be replaced by a SQL query or a REST API query to the source system etc.

Example CSV data used can be seen below:

image

As you can see, my imagination for example project names has not improved! The code uses the Project Name as the key between the two data sets – the CSV file and PWA so the names will need to match.

This script example can be downloaded here: https://gallery.technet.microsoft.com/Update-Online-Custom-Field-12f034f4

The user setting up the script will need to update the correct location to the DLLs required, the PWA instance URL, username, password, the custom field internal name and the location of the CSV file. The account specified will need edit access to all of the projects in PWA. Ensure the variables have been updated correctly, placeholder values seen below:

image

image

The DLL’s used are from the NuGet package here: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.5521.1200. There are later version available, check here: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM. Download those as required.

The get the correct custom field internal ID I use the REST API, <PWA Site URL> + /_api/ProjectServer/CustomFields. Find the project level custom field and copy the InternalName as seen below:

image

Once the PowerShell script has been updated, save it and it can then be tested on a test / non-production environment. Once executed in PowerShell, each project found in the CSV file will be outputted as seen in the example below. In this example two projects exist in the CSV data but not in my example Project Online PWA instance (remember for this example, the names need to match in the CSV file and PWA):

image

Checking in the Project Center after the script has run you can see for the projects that exist in the CSV file, the project budget includes the values found in the CSV file:

image

This PowerShell script could be run on a schedule from a server on-prem or even in Azure. The script would just need access to the data to import (CSV file etc.) and the DLLs. Fully test this script on a test / non-production PWA instance before running on a Production PWA instance.

The script is provided "As is" with no warranties etc.

Last logon time for the #ProjectOnline PWA users report #PPM #PowerBI #PowerQuery #Office365 #SharePoint #BI part 2

October 12, 2016 at 4:46 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Reporting, Workarounds | Comments Off on Last logon time for the #ProjectOnline PWA users report #PPM #PowerBI #PowerQuery #Office365 #SharePoint #BI part 2
Tags: , , , , ,

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

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

Page 2 – PWAUserLastConnectDate:

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

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

It defaults to the Table visualisation, change this to the Pie chart in the Visualizations pane:

image

Drag Id from Details into Values:

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

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

By default, the Logon Date will be broken down into the date hierarchy, change this in the visualisation settings, select Logon Date:

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

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

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

Change the visualisations from a table to a Stacked bar chart and move Id to Values and Browser to the Legend:

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

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

Update the visualisation settings as required by clicking the roller. I added a title and increased the size of the data text:

image

Add a text box to the top of the page and enter the report title, change the settings as required:

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

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

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

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

Select IE:

image

Now update the title from Total Hits to Total IE Hits:

image

Repeat this for the other 4 cards but set one for Chrome, Edge, Firefox and Other so you end up with this:

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

Now repeat this but select Browser and change it to the Chiclet Slicer:

image

Change the settings as required, I added a title, turned off the header row and set it to have 2 columns:

 image

That is the first page set up, rename the page and it is completed:

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

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

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

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

It supports Image URLs, for this I updated the PWAUsage dataset and added a new column called Browser URL:

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

Then update the Chiclet Slicer settings:

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!

Next Page »

Blog at WordPress.com.
Entries and comments feeds.