You are on page 1of 7

Extending the Power BI template for Project

for the Web


In October 2019, the Project team released the Project for the web Power BI Template on
GitHub. This allows users of Power BI Desktop and Project for the web to report on the
project data contained within their Common Data Service (CDS). The template also allows
the users to customize and expand on the capabilities offered with the template, as the file
can be updated and changed to suit an organization’s needs.

Please see the article “Connect to Project for the web using Power BI” on instructions for
connecting to your data source(s) and installing this template.

About the Template file

The template provides connections (queries) for all the base entities of Project for the web,
including Projects, Tasks, Bookable Resources, Project Buckets, Project Team, and System
User. It also provides the connections required to retrieve data from the Roadmap service
(Roadmap, Roadmap Items and Roadmap Item Links), and a version is available that
includes Project Web App (PWA) connections for complete portfolio reporting scenarios. All
template versions are available on GitHub.

The template provides an example of how Power BI and Project for the web can work
together to provide powerful insights into project portfolios.

The Project team is providing this article and template file to help organizations customize
their report content and expand insights into different aspects of a portfolio. As the Project
team provides more functionality in Project for the web, we will be able to customize the
reports further to offer additional visibility into the data managed by the new features.

Adhering to the Power BI Performance Best Practices

It’s often tempting to query for and add all data from a source, with the thought that you
might use it in your report later. By doing this, depending on the size of your data set, you
may significantly impact the performance of the report. The more data the report needs to
load, the longer the load and refresh can take, and the longer the visualizations may take to
render on screen.
We recommend that you focus on the reporting needs for your organization or specific
report scenarios and be very deliberate in your queries by optimizing them to retrieve only
the data required to support your visualizations.

Add and Remove Fields from Existing Queries

This template is an example on how to optimize queries for the topic being explored. There
are fields useful for other topics that have been excluded. The Project entity in the CDS can
be extended in PowerApps to by adding additional fields. For information on how to do
this, see this article on Creating and Editing Fields in the CDS. Those fields can be added
into the queries to expand or change the focus of the Power BI report.

Example: Exploring Location and Program fields

• Choose ‘Edit Queries’ on the ribbon, and from the Query Editor select the ‘Projects’
query (1) from the Queries pane at the left.
• On the right side under ‘Query Settings,’ select the gear icon next to ‘Removed Other
Columns.’ (2)

• Search for any custom columns that you’d like to add to the report. In the
screenshot above (3) we see that this organization has added several custom fields to
their Projects entity. You may choose to add custom columns or additional built-in
columns.
• In our example, we are going to add the ‘cr512_location’ and ‘cr512_program’
columns.

• Select ‘Close & Apply’ on the ribbon in the ‘Power Query Editor’ window, then
choose ‘Refresh’ on the main Power BI window’s ribbon.

Just adding the field in our example above allows the creation of the charts below showing
count of projects by program and location.

Another example scenario could leverage built-in fields like ‘createdon’ to show count of
projects created by month.

Add and remove data queries (tables)


For report developers who want to look at additional customized project management
artifact data as it relates to the projects in the system, you would add new data tables by
querying for custom CDS entities. The template design has made it easy to bring in new
entities and connect them to ‘Projects’ in your data model.

• Choose ‘Edit Queries’.


• Right-click the ‘Project Buckets’ query in the left-hand Queries pane.
• Click ‘Duplicate’.

• For the newly duplicated query currently named ‘Project Bucket (2)’, in the ‘Query
Settings’ pane on the right, delete the steps for ‘Renamed Columns’ and ‘Removed
Other Columns’.
• Click the settings gear on the ‘Navigation’ step. (1 in the image below)
• Select the entity to which you want to navigate. In our example we’re selecting an
entity labeled ‘cr512_issues’. In this example, this is a custom entity in the CDS which
stores issue-related data for our projects.
• Rename your query in the ‘Query Settings’ pane. Here we’ve renamed the query
‘Issues’. (2 in the image below)
• Optionally, choose the columns you’d like to keep using the ‘Choose Columns’
option from the ‘Home’ ribbon ‘Manage Columns’ section.
• Optionally, rename your columns to something a little more user friendly. (This will
help your reports look more professional and improve the Q&A feature in the Power
BI Service.)
• Select ‘Close & Apply’ on the ribbon in the ‘Power Query Editor’ window.
• Navigate to your ‘Model’ view and create relationships as needed with your new
entity and the Projects entity.

Note: The relationships to create will depend on your specific scenario. In this example,
we have connected the ‘Issues’ table to the ‘Projects’ table on the Project ID (‘Project ID’
in Projects to ‘cr512_msdyn_project’ in Issues).
Alternatively, the ‘Auto Detect’ relationships feature can often find new relationships in your
data. On the ribbon of the main Power BI screen, select ‘Manage Relationships’ and click
the ‘Auto Detect’ button at the bottom. Power BI will discover the new data relationships in
the report. When complete, it will display how many new relationships it found now that
new data and fields have been added in. You’ll want to review these new relationships to
ensure that the resulting data model is what you expect.

Using the additional data and relationships, a doughnut chart using Projects, ‘Project Name’
and Issues, Count of ‘cr512_issueid’ is possible. Here we can see that there are two projects
with the most issues, the “Automated Tracking Sensor” project and the “Power BI Migration”
project, both with a count of 4 issues.
Additional Resources
As you can see, the possibilities in customizing and extending the reports are limited only
by how your organization has decided to tailor the project management tools in Project for
the web to your needs.

As you add more connections (queries) to the report, you may choose to allow the Power BI
service to provide you with insights from your dataset.

For a summary of how Power BI Insights can be used, please see the article here:
https://docs.microsoft.com/en-us/power-bi/service-insights

Additionally, pinning visualizations to a dashboard can lead to using Q&A in the Power BI
service to get additional insights from the dataset.

For details on dashboard development, see this article: https://docs.microsoft.com/en-


us/power-bi/service-dashboard-create

And for additional information on Q&A see this article: https://docs.microsoft.com/en-


us/power-bi/power-bi-tutorial-q-and-a

You might also like