How to Create a Portfolio KPI Report in Project Online

US_Navy_100219-N-2953W-060_Air_Traffic_Controller_3rd_Class_James_Boutin_stands_the_approach_control_watch_in_the_carrier_air_traffic_control_center_aboard_USS_Carl_Vinson_(CVN_Back in 2015, my colleague Nate Auchter wrote a great article in which he demonstrates how to build a key performance indicator report in Project Online using Microsoft Excel. (The full article can be found on the MPUG website here.) While Nate’s article uses a subjective custom field to create the KPI, this article places the focus on creating custom columns with data retrieved from Project Online to calculate and display the KPIs — so users would be able to evaluate the performance of the entire portfolio of projects based on live data.

Initial Step: Define KPI Criteria

The first step in building a KPI report is to define which is the criteria that will be applied to the data. In this example, we evaluate the projects by three measurable metrics: schedule, work and cost.

The main goal will be to discover the percentage of variance for the three metrics and then display a collection of stoplights based upon the results. The criteria will be the following:

Raphael_Santos_KPI_reporting_figure_1

Retrieve Data from Project Online

To get started building our report, the initial step is to retrieve the data out of Project Online and bring it to Microsoft Excel. We’ll use two data connections from the OData feed: Projects and Project Baselines. Follow these steps:

  1. Open Microsoft Excel. On the Data tab, click From Other Sources | From OData Data Feed.
  1. To get only the fields and projects that will be used in the report, use the following query by copying and pasting it in the data field location. Don’t forget to replace the <YOURCOMPANYTENANTNAME> text with the name of your company’s tenant):

https://<YOURCOMPANYTENANTNAME>.sharepoint.com/sites/pwa/_api/ProjectData/Projects()

?$filter=ProjectType ne 7&$select=ProjectId,ProjectName,ProjectOwnerName,EnterpriseProjectTypeName,

ProjectStartDate,ProjectFinishDate,ProjectDuration,ProjectCost,ProjectWork,ProjectFinishVariance,

ProjectCostVariance,ProjectWorkVariance,ProjectPercentCompleted

  1. Click Next. At this point, you might get prompted to insert your credentials to authenticate in your Office 365 tenant. Inform your credentials to proceed (if applicable).
  1. In the next dialog, select the table that contains the data we want — in this case, the “Projects” table — and click Next.
  1. In the next dialog, you can give a friendly name to your data connection so it will be easy to identify and use in the future. After doing that, click Finish.

Finally, when finishing the import process, select the Only Create Connection option.

Raphael_Santos_KPI_reporting_figure_2

The steps above will pull the selected data from the Projects table. Now you need to retrieve the complementary data, which is stored in the Project Baselines table. Follow the same steps we took previously, changing the query to the following:

https://.sharepoint.com/sites/pwa/

_api/ProjectData/ProjectBaselines()

?$filter=BaselineNumber eq 0 & $select

=ProjectId,ProjectBaselineCost,ProjectBaselineDuration,ProjectBaselineWork

Manipulate the Data

Even though we have all the data required to build the report, at this moment there’s not much we can demonstrate with it. To make the data meaningful we need to manipulate the data connections by establishing a relationship between them and creating some calculated columns. All of this can be accomplished through Power Pivot.

In Microsoft Excel, on the Power Pivot tab, click Manage:

Raphael_Santos_KPI_reporting_figure_3

The first action to be performed is to create a relationship between the two tables. Once Power Pivot is launched, click on Diagram View:

Raphael_Santos_KPI_reporting_figure_4

You will see the two tables with the data that has been retrieved from Project Online:

Raphael_Santos_KPI_reporting_figure_5

To establish a relationship between them, on the Design tab, click Create Relationship:

Raphael_Santos_KPI_reporting_figure_6

On the Create Relationship dialog, first select the Projects table and then the ProjectId field. Then, select the ProjectBaselines table and the ProjectId field and click OK:

Raphael_Santos_KPI_reporting_figure_7

After creating the relationship, on the Home tab, click Data View to return to the visualization of the data.

Once the relationship between the tables is established, your next action will be to create the custom columns that will calculate the percentage of variance for schedule, cost and work. In Power Pivot, on the Design tab, click Add:

Raphael_Santos_KPI_reporting_figure_8

First, we’ll create the custom column that calculates the percentage of finish variance. Use the following expression, which you can once again copy and paste:

=IF(RELATED(ProjectBaselines[ProjectBaselineFinishDate])=0,-100,

[ProjectFinishVariance]/RELATED(ProjectBaselines[ProjectBaselineDuration])*100)

After creating the custom column, you can right-click it and rename it to “Percent Finish Variance” (or another name of your preference).

Now you’ll need to create two more custom columns. Follow the same steps, using the expressions below:

Percent Cost Variance

=IF(RELATED(ProjectBaselines[ProjectBaselineFinishDate])

=0,-100,IF([ProjectCostVariance]=0,0,[ProjectCostVariance]

/RELATED(ProjectBaselines[ProjectBaselineCost])*100))

Percent Work Variance

=IF(RELATED(ProjectBaselines[ProjectBaselineFinishDate])

=0,-100,IF([ProjectWorkVariance]=0,0,[ProjectWorkVariance]

/RELATED(ProjectBaselines[ProjectBaselineWork])*100))

Once all custom columns are created, you can close out Power Pivot and return to Microsoft Excel.

Build the Report

Once we have all the data that we need, we can start building the report. In Microsoft Excel, click Insert | PivotTable. Keep all the selections that were offered by the wizard and click OK. Next, in the contextual PivotTable Tools section in the Ribbon, click Design | Report Layout and select the Show in Tabular Form option:

Raphael_Santos_KPI_reporting_figure_9

In the same contextual menu, click Design | Subtotals | Do Not Show Subtotals.

Now, add the fields that will be part of the report to the pivot table. Drag and drop the fields to the pivot table areas as follows:

Rows area:

  • Project Name
  • Project Owner
  • Start Date
  • Finish Date

Values Area:

  • % Finish Variance
  • % Cost Variance
  • % Work Variance

Raphael_Santos_KPI_reporting_figure_10

You can also remove the unneeded subtotals and apply formatting to the fields in the pivot table report based on your preference. The result might look like this:

Raphael_Santos_KPI_reporting_figure_11

As we want the percentage variance fields to display the stoplights accordingly to their values, we need to apply conditional formatting to them. Select one value in the % Finish Variance column and click on Conditional Formatting | New Rule:

Raphael_Santos_KPI_reporting_figure_12

The rule will be applied as follows:

  1. In the Apply Rule To option, select All cells showing “% Finish Variance” values for “Finish Date.”
  2. In the Select a Rule Type section, keep the Format all cells based on their values option selected.
  3. In the Edit the Rule Description section, do the following:
  4. On Format Style, select Icon Sets.
  5. On Icon Style, select one option that displays for possible icons (any of the available ones) and check the Show Icon Only option.
  6. On Display each icon according to these rules, you will have to apply the following configuration:

Raphael_Santos_KPI_reporting_figure_13

The result will look like this:

Raphael_Santos_KPI_reporting_figure_14

After applying the rules, click OK to see your results. You then need to create the same rules for the two other custom columns (cost and work). The final result will look something like this:

Raphael_Santos_KPI_reporting_figure_15

Finally, you can make your report look better by adding slicers, title, logo and legend:

Raphael_Santos_KPI_reporting_figure_16

Remember that you can adapt the rules that have been used in this example to better align the icons to your company’s standards.

Once you’re ready to go, you can upload the report to your company’s Project Online instance and make it available to the appropriate users.

Do you have your own techniques for reporting KPIs? Share them with the rest of the MPUG community in the comments below!

Written by Raphael Santos
Raphael Santos is a PPM enthusiast with expertise in providing Microsoft Project, Project Online, and Project Server solutions. He has worked in several projects to implement PPM tools, including projects located in Latin America (Brazil, Peru, and Argentina), in the United States, and in Africa. He is also a trainer with more than 10 years of experience teaching users how to use Project Management tools in a more productive way. In 2016, Raphael was awarded the MVP title by Microsoft in recognition of his contributions to the Project Management community. Raphael is a PPM Consultant at Sensei Project Solutions, a certified Microsoft partner specializing in project and portfolio management deployments. Sensei offers a complete set of services to help organizations succeed with their Microsoft PPM deployments. Services include full implementation and training as well as pre-configured solutions and report packs. Visit senseiprojectsolutions.com or contact info@senseiprojectsolutions.com for more information.
Share This Post
Have your say!
00

Leave a Reply