Vous êtes sur la page 1sur 68

Table of Contents

VSTS & PowerBI


Overview
Power BI integration overview
How-to Guides
Client authentication
Power BI Content Pack
Connect to VSTS with Power BI Content Pack
Create dashboards
Create trend charts
Create rollup charts
Power BI Data Connector
Assign permissions (Security)
Connect to VSTS
Access data through Power BI desktop
Power BI desktop and OData aggregations
Share reports, publish to PowerBI.com
Samples
Power BI example reports
Reference
Power BI available data
Data Connector available functions
Analytics Service overview
Resources
Dashboards, charts, & widgets
PowerBI Desktop
PowerBI Documentation
Insights Lab Power BI Widget
VSTS & PowerBI
9/27/2017 1 min to read Edit Online

VSTS

NOTE
Feature availability: Using the Power BI Content Pack, you can generate PowerBI dashboards and reports. The Power BI
Data Connector, however, requires access to the Analytics Service. The Analytics Service is in a closed preview at this time.
Both the Power BI Content Pack and Power BI Data Connector are only available for VSTS.

How-to Guides
Assign permissions (Security)
Power BI Content Pack
Connect to VSTS with Power BI Content Pack
Create dashboards and reports
Create trend charts
Create rollup charts
Power BI Data Connector
Connect to Power BI via the Data Connector
Power BI desktop and OData aggregations
Share reports, publish to PowerBI.com

Reference
Power BI available data
Data Connector available functions
Analytics Service overview

Resources
Dashboards, charts, & widgets
PowerBI Desktop
PowerBI Documentation
Insights Lab Power BI Widget
Power BI integration overview
10/25/2017 3 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

Gain insight and analyze the progress and quality of your project by connecting Power BI to the data collected and
stored in VSTS. Currently, you can choose between two different options depending on your reporting
requirements.

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily due
to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

The first option, the Content Pack, contains a complete analytic data model (tables, relationships and measures), a
set of default reports and a default dashboard. Reports and dashboard are fully customizable but the data model is
not. All VSTS customers can use the Content Pack to generate dashboards and reports.
This option is great for users who want to get quick insights without the need of building custom models. The data
model is shared between all users and therefore does not support process customization, this is one of the primary
reasons to consider the second option. To learn more, see Connect to VSTS with Power BI Content Pack.
The second option, Data Connector, has been released with the Power BI Desktop January 2017 Update. This
option is available in the Power BI Desktop. It allows users to select the data they are interested in, which includes
support for a fully customized data model by including project-specific fields, work item customizations, and
adding tables from additional data sources.
Since you select which data to load, this approach works well for very large accounts, that could not use the
Content Pack in the past. To learn more, see Connect to VSTS with Power BI Data Connector.
The following table contains a detailed comparison of both options.

CONTENT PACK DATA CONNECTOR


First release date May 27, 2015 January 9, 2017

Last update date September 2, 2015 -

Data Source VSTS REST API Analytics Service 1

Power BI Service 2

Power BI Desktop

Available Data

Work Items - Current state

Work Items - History

Work Items - Customization

Source Control - Git

Source Control - TFVC

Builds - XAML

Elements

Tables

Relationships

Measures

Reports

Dashboard

Power Query Functions

Authentication

Microsoft Account (Live ID)

Azure Active Directory (AAD)

OAuth

Personal access token

Alternate credentials
Other

Support for large accounts 3

Support for custom measures

Support for mashup with additional data sources 4

Notes:
1. The Analytics Service is in closed preview at this time.
2. The data model is created in Power BI Desktop. Then, it can be published and refreshed in Power BI Service.
3. There is a limit on how long a refresh operation can take before it gets terminated by the system. Using the
number of work items as a proxy measure for the size of account, an account is considered "large" accounts
when it has over 400k work items.
4. Power BI Desktop allows users to load tables from different sources and combine them into a single data model
(e.g. custom working days calendar).

Related notes
To get started using Power BI and the Analytics service, make sure you have permissions required to access the
Analytics service and then review the knowledge base of articles.
Connect to services with content packs for Power BI
Connect to VSTS with Power BI Data Connector
Data Connector - Example reports
Functions available in Power BI Data Connector
Available data tables in the Power BI Content Pack
Client authentication options
9/12/2017 4 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

In general, the order of authentication options should be the following (in order from most secure to least secure):
Azure Active Directory (AAD) then Personal Access Tokens (PATs) then Alternate Access Credentials (AACs).

Azure Active Directory (AAD)


"Azure Active Directory" is also known as "Organizational Credential" in Power BI Desktop. You can use it in
PowerBI.com through OAuth2 selection when configuring data refresh.
When connecting with Power BI Desktop you will be prompted to enter your credentials for the data source. Click
Organizational account as shown here:

Click the Sign in button and you will be prompted to enter your AAD credentials. After that, you're done.
To change an existing URL to use AAD instead of a PAT or AAC, see Change authentication credentials later in this
topic.
Publish to PowerBI.com
After you have created the model and loaded it with data you can publish it to Power BI. When using AAD, make
sure to select the oAuth2 option.
Create a Personal Access Token
Why use a Personal Access Token over an Alternate Access Credential? For these three reasons:
As part of good password management, these tokens automatically expire so you don't have to remember to
change your password
Since PATs are a generated password, you won't use a common password as part of your AAC, which means a
more limited surface area for attack
If you need to provide a diagnostic trace and forget to replace the value, you can simply revoke the credential
thereby maintaining secure access to VSTS.
1. Log in to VSTS, and choose My security from your account menu options.

2. From the Personal access tokens page, click Add:

3. Click Add, and fill out the required information:


Add a description
Set the expiration period
Select the account
Choose Selected scopes
Check the Analytics (read)
And, then click Create Token.
4. Copy the token that displays. If you navigate away from the page, you won't be able to retrieve it later.

5. If you need to revoke a token, simply navigate to this page and click the Revoke link. That token will
immediately be deniedaccess to VSTS.
These tokens are your identity. When used, the token is acting as you. Keep your tokens secret and treat
them like your password. To help keep your token more secure, consider using credential managers so that
you don't have to enter your credentials every time you push.

Create an Alternate Access Credential


Alternate Access Credentials should be used as a last resort, but if you have to use them, do the following:
1. From the Security page, open Alternate authentication credentials.
2. Check Enabled alternate access credentials, enter a password, confirm the password and then click Save.

Enter credentials within a client


Both Power BI and Excel work using Power Query when accessing OData, therefore the authentication mechanism,
including the various authentication screens are identical. This walkthrough is done using Power BI Desktop,
however it also applies to Excel.
1. Open Power BI Desktop.
2. Click Get Data.
3. Click OData Feed (or More > Other > OData Feed).
4. Enter the URL for the OData endpoint and click OK.

5. In the authentication dialog, click Basic, enter your credentials, and then click Connect:
If you are using an AAC, enter your username and password
If you are using a PAT, enter a text string, such as "test" or "user" for the username and enter the
token in the password field.
Change authentication credentials
If you receive an access denied message, you may need to change your authentication credentials. Power Query
caches your credential information so you only have to enter it once. However, Personal Access Tokens expire and
you may need to update or change your authentication information.
Update credentials in Power BI Desktop
1. Open Power BI Desktop.
2. Click File > Options and Settings > Data Source Settings. Select the correct URL to the OData Feed and
click Edit.

3. In the next Data Source Settings dialog, click the Edit button under the Credentials setting.
4. Edit the credentials as noted above, click Save, then Done, then Close.
Update credentials in Excel
1. Open Excel and click the Data tab.
2. Click New Query > Data Source Settings...

3. Select the correct URL to the OData Feed and click Edit.
4. In the next Data Source Settings dialog, click the Edit button under the Credentials setting.

5. Edit the credentials as noted above, click Save, then Done, then Close.

Related notes
Analytics service overview
Authenticate your identity with personal access tokens
Access data through Excel
Access data throughPower BI desktop
Publish a Power BI Desktop file to PowerBI.com
Connect to VSTS with Power BI Content Pack
10/25/2017 5 min to read Edit Online

VSTS

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily due
to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

You can gain insight and analyze the progress and quality of your project by connecting Power BI to the data
collected and stored for VSTS.
For a list of currently available data, see What's available in the Power BI VSTS Connector.

Authorize Power BI to access your account data


Your first step requires you to authorize Power BI to access your VSTS account. Choose between one of these two
connection scenarios when connecting to Power BI:
Scenario #1: You use the same Azure Active Directory (AAD) account to log in to VSTS and Power BI.
Scenario #2: You use an MSA (Microsoft account/LiveID) to log in to VSTS or you use different AAD
credentials to log into VSTS than you use to log into Power BI.
Prior to performing either Scenario #1 or #2, make sure you have permissions required to access the Analytics
service.

Scenario #1: Log in using AAD


1. Open a web browser and go to http://powerbi.com.
2. Click Sign In in the upper right corner to log in to Power BI.
3. In the lower left corner, click Get Data.

NOTE
If you don't have a Power BI account you can create one by entering your email address and click Use it free.

4. Click Get under Services on the Get Data page.


5. Select the VSTS connector and click Connect.

6. Enter the names of the account and team whose data you want to connect to and click Next.

IMPORTANT
For the Account, do not include visualstudio.com (if the account is "corpx.visualstudio.com" just enter "corpx").
NOTE
Wildcards are supported for the Project name. You can enter "*" for every project in the account or, if you had
projects with these names "Test1", "Test2", "Test3", "App1", "App2" and enter "Test*" Power BI will retrieve data for
the projects Test1, Test2 and Test3. However, you cannot enter something like "T*st".

7. The next step specifies the authentication method. Only oAuth2 is supported. Click Sign In to continue.
IMPORTANT
You won't be able to connect if your account administrator disabled third party application access via OAuth. When
enabled, it appears as follows on the Administration>Control panel>Settings page:

Contact your account administrator to determine if it needs to be enabled.

8. Successful authorization displays the following authorization dialog which allows Power BI to retrieve data
from your account. Scroll down to the bottom and click Accept.

9. Once Power BI is authorized, data will begin to load and you'll be presented with a loading screen until the
data is complete. Depending on how much data there is, it may take a few minutes to as long as 30 minutes
to complete the data load.
At this point you can close your browser and come back to Power BI later. Power BI data refreshes every 24
hours by default. If you have a paid Power BI account, you can refresh the data as frequently as every hour.

Scenario #2: Log in when you use different credentials for VSTS and
Power BI
If you are using a Microsoft Account or different AAD credentials than you use for Power BI, you will need to
supply those credentials to VSTS to get access to the data. This can happen in one of two ways. Either, the connect
experience will prompt you for the credentials or, if you access VSTS often, your browser may have your most
recent credentials cached. If the cached credentials match the account you are connecting to, it will work
seamlessly, however, this caching can be confusing if the last account/username you used isn't the one you need
to enable Power BI to access the VSTS data. This can lead to Access Denied errors. If you are getting access denied
errors without any prompt for credentials, then you should use In Private in IE or Incognito in Chrome to bypass
the cache.
If your cached credentials work, you won't get prompted. If you don't have cached credentials, then you will be
prompted to login to VSTS. If you are using a Microsoft account enter your credentials on the right hand side of
the dialog. If you are using AAD credentials, click the Sign in with your work or school account link on the left
hand side of the dialog.
IMPORTANT
There is a situation that can occur where Power BI will still try to use your cached credentials even though they are different
than the credentials you used when logging onto Power BI. In this case, the VSTS Authorize dialog will still be displayed
however, you'll be logged on as the wrong user. To correct this situation, do the following:
Click Sign out in the Authorize application page
Close the page and click Sign In again on the Power BI Configure VSTS dialog
You will then be prompted to enter your VSTS credentials and everything will work as normal.

Related notes
To get started using Power BI and the Analytics service, make sure you have permissions required to access the
Analytics service and then review the knowledge base of articles.
Always check into updates of What's available in the Power BI VSTS Connector to learn about the latest data and
changes made to the VSTS Connector.
To understand the default reports available, see Create reports with data from using Power BI for VSTS.
Create Power BI dashboards and reports
10/25/2017 3 min to read Edit Online

VSTS

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily due
to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

You can create dashboards, individual reports, or explore data collected for your VSTS account once you connect
to Power BI. As the Power BI data model for VSTS grows to include more features you'll have access to more
advanced reporting. As Power BI is upgraded, it will provide you with additional visualizations and capabilities over
time without any upgrades.
Prior to working with VSTS data, review Power BI - Guided Learning.

Get started
After getting connected to VSTS you will see an initial dashboard. On the left side of the screen you will notice
Dashboards, Reports and Datasets.

These are related in the following way: Dashboards contain charts that are based on Power Q&A or charts
contained in a report. Reports contain charts based on data contained in the dataset.
Currently, a report can be based on a single dataset. You can create as many reports based on a dataset as you
want. Dashboards can contain charts from one or more reports or Power Q&A questions.

NOTE
Consider renaming the dataset, report and dashboard immediately after the data finishes loading. Every time you click Get
Data, new data is imported with the name "VSTS" and another dataset, report and dashboard is created. This can become
confusing very quickly.
A good habit is to rename the datasets based on either the account or the project name. For example, using Fabrikam as the
account or Fabrikam.projectA to differentiate a project will make using Power BI much easier.

Work with datasets


Refer to Get started with Power BI for information on working with datasets.

Work with reports


Reports are at the heart of Power BI and provide the basis for dashboards. Dashboards are the shareable
component of Power BI. See the Power BI documentation on Reports for more information.
Understand the default report
The VSTS content pack generates a single report with several pages.

REPORT PAGE DESCRIPTION

Open Bug Status This is a general bug status report which is applicable to all three of the out-of-the-box
processes (Agile, CMMI, and Scrum. All charts exclude closed bugs (State=Closed or Done).

Git Activity Provides source control file information for a team project created to use Git. Report pages
show data from the last 30 days only.

(Team Foundation) Version Provides source control file information for a team project created to use Team Foundation
Control version control (TFVC).

Builds (Xaml) Information related to automated builds. This does not include the latest build engine released
with TFS 2015 (formerly Build v.Next).

Agile Project Status * basic report that details data pertinent to a team project created with a version of the Agile
process.

Scrum Project Status * basic report that details data pertinent to a team project created with a version of the Scrum
process.

CMMI Project Status * A basic report that details data pertinent to a team project created with a version of the CMMI
process.

Pull Requests Provides information related specifically to pull requests for a team project created to use Git.

* Delete any project status report pages that don't apply to your particular situation and update the dashboard as
appropriate.
Edit the default report
For information on how to edit the default report, see the Power BI documentation.
Work with Dashboards
For help in creating and managing Dashboards, see the Dashboards in the Power BI service.
Create trend charts
10/25/2017 3 min to read Edit Online

VSTS

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily due
to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

Trend charts show progress or activity over time. Common types of trend charts include sprint burndowns or
burnups, cumulative flow diagrams, and bug activity.

Story points burnup trend chart


By following steps through of the basic steps shown below, you'll see the trend of story points as their
added to the work item store.

Story points provide an estimate of the amount of work required to complete a user story (Agile process) using
any unit of measurement your team prefers, such as t-shirt size, story points, or time.
If you use the Scrum or CMMI processes, you can create similar charts by filtering on the Effort or Size fields.

Basic steps to create a trend chart


The following image shows the basic steps to create a trend chart. In step , you expand the Fields sections to
checkmark the X and then Y axis fields on which to create the report. Here we check Story Points for the X axis and
the Date field for the Y axis.
After you have your initial chart, you can change the chart type and apply additional filters as shown in the
examples below.
if you're new to Power BI, go here to Connect to Power BI.
You can create Power BI trend charts for data stored in VSTS. To access similar charts for on-premises TFS, see
Create status and trend charts in Excel.

Apply State filter


To focus the trend chart to count only story points from active or in progress work items, add the state filter and
check those values associated with being Closed, Completed, Cut, or Done. For example:

Apply step and change the chart type from a column to a line chart, and your chart will look more like this one.
Apply additional filters to create a burndown chart
To change the trend chart to a burndown that focuses on a specific iteration, add the Iteration Path to the filter set
and choose the iteration of interest.

This chart indicates that most of the work was finished in the iteration, but there are still some story points
assigned to the iteration that haven't been closed. Beware! These are things to investigate.
You can also apply advanced filtering on the Date field to focus only on the start and end dates for your selected
sprint. Here we add the Date field and set the advanced filters to:
First option: is on or after the first day of the sprint
And
Second option: is on or before the last day of the sprint.
This changes the trend to the following:

This chart indicates that some work wasn't scoped until a day or two after the sprint started and that some work
was added to the sprint a day or two before the sprint was started (indicated by the line starting at 150 on the first
day instead of zero). Note also that by constraining it with the iteration and the date it ends nicely on the last day
showing how many story points were not delivered.

Related notes
The sprint burndown chart based on Story Points provides you with a daily update of your sprint progress when
you don't break your stories down into tasks. You can update the chart further by adding Work Item Type as an
additional filter to differentiate the story point count for bugs versus user stories.
Get started using Power BI and the VSTS connector
Create dashboards and reports
What's available in the Power BI VSTS connector
Add a page to a Power BI report
Save a report in Power BI
Pin your chart to a dashboard
To pin your trend chart to a dashboard, follow the steps provided in Pin a tile to a Power BI dashboard from a
report.
More about sprint burndown
To learn more about healthy and unhealthy sprint burndown charts, see Sprint burndown.
Additional chart resources:
Create charts from flat-list queries
Cumulative flow diagram
Create rollup charts
10/25/2017 4 min to read Edit Online

VSTS

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily due
to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

Rollup provides summed values of select fields for all child work items of a parent. You can create rollups based on
counts of work items or selected measures, such as Story Points, Effort, Size for backlog items and Original
Estimate, Remaining Work, Completed Work for tasks.
Natively, VSTS provides rollup of Remaining Work for tasks on the Task board.

With Power BI, you can create additional rollup charts for those supported rollup paths.

Rollup count of tasks per user story


Here's an example that shows the number of child tasks and their state for each user story. Unparented tasks are
also listed.
You can create this type of rollup chart by following steps through outlined below.
Optionally, can also add different measures such as Completed Work or Remaining work to see that information
instead of just counts.

Basic steps to create a rollup chart


The following image shows the basic steps to create a rollup chart. In step , you choose the parent and child
work item types that will filter the rollup. For example, by choosing Parent User Stories>User Story and Work
Items/Task, you get a table that will rollup the count of Tasks that are children of each user story.
After you have your initial chart, you can change the chart type from Table to Matrix and add the State field to the
Column to expand the number of columns in the chart.
If you use the Scrum or CMMI processes, you can create similar charts by first choosing the Parent Product Backlog
Items/Product Backlog or Parent Requirements/Requirement fields for the first column of the matrix in .
if you're new to Power BI, go here to Connect to Power BI.
You can create Power BI rollup charts for data stored in VSTS. To access similar charts for on-premises TFS, see
Rollup of work and other fields.

Supported rollup paths


The VSTS data model supports rollup along these pre-defined paths.
Agile process: Epics > Features > User Stories > Bugs > Tasks
Scrum process: Epics > Features > Product Backlog Items > Bugs > Tasks
CMMI process:
Epics > Features > Requirements > Bugs > Tasks
Issues > Tasks
Epics > Features > Requirements > Change Requests > Issues > Bugs > Tasks
Rollups within any one of these chains will work as well. For example, child Tasks of Epics will rollup to the Epic
level.
Rollup doesn't support those parent-child relationships that don't follow this structure. For example, rollup isn't
supported for parent Risks and child tasks (CMMI process). Also, the rollup data model doesn't support custom
parent-child links and hierarchies.

TIP
Use the Parent... dimensions only for hierarchical charts. Use the Work Items dimension for all other standard charts.

Apply State filter


To focus the rollup chart to count only active or in progress tasks from, add the state filter and check those values
associated with being Closed, Completed, Cut, or Done. For example:

Related notes
The sprint burndown chart based on Story Points provides you with a daily update of your sprint progress when
you don't break your stories down into tasks. You can update the chart further by adding Work Item Type as an
additional filter to differentiate the story point count for bugs versus user stories.
Get started using Power BI and the VSTS connector
Create dashboards and reports
What's available in the Power BI VSTS connector
Add a page to a Power BI report
Pin a tile to a Power BI dashboard from a report
Save a report in Power BI
Rollup requirements
To support rollup of different measures such as Story Points, Effort, Size, Completed Work, or Remaining Work,
structure your work items according to the following recommendations:
Use parent-child links to link work items that contain values that you want to rollup.
Add required fields to the WITs that will capture the rollup values. Default fields used to schedule work are only
present on the task work item. These fields are:
Original Estimate (Microsoft.VSTS.Scheduling.OriginalEstimate): The amount of work required to
complete a task. (Agile and CMMI)
Completed Work (Microsoft.VSTS.Scheduling.CompletedWork): The amount of work that has been spent
implementing a task. (Agile and CMMI)
Remaining Work (Microsoft.VSTS.Scheduling.RemainingWork): This field is used to support burndown
charts.
If your team project was created using the Visual Studio Scrum process template, only Remaining Work
is defined in the task.
To learn more about adding fields, see Modify or add a field to support queries, reports, and workflow.
Determine the unit of time used to track work and make sure it is used consistently across your team or
organization. For example, you can track tasks using hours or days.
Determine if you want to make rollup values read-only on the work item form. By making them read-only you
prevent users from entering inaccurate data. You make fields read-only using the Control field Readonly
attribute.
Permissions required to access the Analytics service
9/13/2017 2 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

The Analytics service implements a subset of the security found in the VSTS operational store. The security
container in the Analytics service is at the team project level.

NOTE
The Analytics service does not support security at the area path level. Therefore, if a user has access to a team project and
can report on that project but they don't have access to work items in specific areas of that project, they can view data
through the Analytics service. Therefore, to protect your data, the best practice is to not allow reporting against the
Analytics service for any user who does not have access to all data within a team project.

Security is granted by giving a user the View analytics permission in VSTS.


The whole truth or nothing at all
The Analytics service is designed to provide accurate data - not data trimmed by your security settings.
For example, take the following scenario:
Project A has 200 work items
Project B has 100 work items
If a user with access to both projects issues a query that says "give me the sum of all work items in Project A and
Project B" the result will be 300 which is as expected. Now, say that another user who only has access to Project B
makes the same query the expected results might be 100. However, the Analytics service will not return a result at
all in the latter case. Instead, it will return a "Project access denied" error. The reason for this is that in requesting a
specific set of data the service could not return the "truth" so it returns nothing at all.
This behavior is different from that provided by the current Work Item Query editor which would return you all
the work items in Project B but nothing from Project A without informing you that there is missing data.
Because of this scenario, the recommended approach for querying the Analytics Service is to always provide a
project level filter instead of using a global query. For information on providing a project level filter, see WIT
analytics.

Related notes
Power BI integration overview
Connect to VSTS with Power BI Data Connector
9/27/2017 9 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

You import data from the Analytics Service for VSTS into Power BI using a data connector.

Import data
1. Make sure you have Power BI Desktop January 2017 Update or a newer version. You can download it
from the official Power BI Desktop download page.
2. Make sure you have permissions required to access the Analytics service.
3. Launch Power BI Desktop and get your data. Select Get Data using one of the two options to access
the Data Connector.
You can either click Get Data button in the splash screen that opens up when you launch Power BI.

Or, you can find a similar button in the ribbon in the Home section.
4. Select the VSTS (Beta) entry listed under the Online Services category, and click Connect.

5. Confirm acceptance of using the data connector that is in Preview. While the data connector is in
Preview you need to confirm that you are aware of the implications.
Select Don't warn me again for this connector to avoid seeing it every time you want to use the connector.
Then, click Continue.
6. Specify the basic parameters to connect to your data. VSTS account name" and Project name are
mandatory.

For VSTS account name, enter just the account name and not the full URL (e.g. use fabrikam-fiber-inc
if the URL of your account is " https://fabrikam-fiber-inc.visualstudio.com ").
For Project name, enter just the project name (e.g. use Fabrikam-Fiber-Git if the URL of your project is
" https://fabrikam-fiber-inc.visualstudio.com/Fabrikam-Fiber-Git ").
For Area path(s) (optional), enter the full path as it appears in the Area field of your work items
and optionally add \* suffix to include all children.

TIP
The Area path(s) parameter supports wildcards. You can add \* at the end of the path to include all its
children. Also, you can specify multiple paths by entering each path separated by the | (vertical bar)
character.
IMPORTANT
Don't confuse the team name with the project name, a common mistake. If the URL you use on the daily
basis is " https://fabrikam-fiber-inc.visualstudio.com/Fabrikam-Fiber-Git/Device ", then
Fabrikam-Fiber-Git is the project name, whereas Device is the team name.

7. Sign in to the service. Upon first-time access, you're required to sign in and have your credentials
authenticated. Power BI Desktop saves your credentials so you will only have to do this once.
Choose between these two authentication options:
Select Organizational account if your organization is using Azure Active Directory to manage users.
Select Basic if you are connecting to a personal account or you want to use personal access token.
This option also support alternate credentials, but it is not recommended as unlike personal access
tokens, this login doesn't expire and can't be scoped to limit access to your VSTS data.

If you select Organizational account, enter your username and password into the standard login
page.

8. Click connect upon verification of your credentials. Upon successful login Power BI will verify if your user
account has the right permissions to access the specified team project. If any errors arise, refer to the Q &
A section as it covers the most common problems.
9. Select tables to load. Once your credentials are saved they will be used to fetch the list of available
tables. To learn more about available tables, see Available data tables in the Power BI Data Connector.
Click Work Items - Today table and wait for the preview to load. It represents the current state of all Work
Items in the project. Columns are sorted alphabetically. Each column corresponds to a field.
Select the checkbox next to Work Items - Today table and click Edit to enter query edit mode.

NOTE
We don't recommend that you click the Load button as it will load the whole table. Loading the whole table will
succeed only if the number of Work Items is less than 200K. Otherwise the load operation will fail with an error
message saying that the number of rows exceeded the allowed limit. For more information, see How do I resolve
error: Query result exceeds maximum size... in the Q & A section.

10. Select relevant rows. Just as you can define work item queries in VSTS you can also select the Work
Items that you are interested in using the Power BI Query Editor. The query editing experience differs from
that of the web portal as it shows you a preview of the dataset after each filter or transformation step you
make.

TIP
Filtering rows can significantly decrease the load time and speed up queries against the dataset. One of the best
ways to reduce the number of rows is to set filter on State column.

Although the Work Items - Today table is already filtered to a selected Project and Area Path, it can still
result in a very large dataset. Therefore, we recommend you add additional filter steps.
You can do this and quickly reduce the number of rows by setting the filter on State column.
a. Scroll horizontally to see the State column.
b. Click the filter drop-down button.
c. Select active states.
d. Click OK to accept the selection.

You can combine many filters by applying them in a sequence. For example, in order to add additional
filterS on Work Item Type you can repeat the steps from above.
11. Select relevant columns. As you can see in the preview, the Work Items - Today table has many
columns, one for each field available in any Work Item used in the project. Depending on the process
referenced by the team projectAgile, Scrum, or CMMIthe number of columns can be very large,
reaching even hundreds. Of course, not all of them will be relevant to your reporting scenarios.

TIP
By selecting only those columns of interest you decrease the load time, speed up queries, and make the data
model easier to work with.

Follow these steps to select relevant columns: a. While holding Ctrl button on the keyboard scroll and
click column headers to select columns you care about.
b. Once all the columns are selected, right-click the header to open context menu.
c. Select Remove Other Columns to insert selection step.

12. Close the Query Editor and apply your changes. After filtering rows and selecting columns you can
either finish and click Close & Apply or add additional transformation steps.

IMPORTANT
Power BI automatically translates filtering and columns selection steps into queries to the underlying data source
provided that they appear at the beginning of Applied steps list. Always start with filtering and columns selection
before you apply more advanced transformations such as adding custom columns.
13. Wait for the data to load. Closing the Query Editor triggers the load operation. You can observe its
progress by looking at the status messages, which appear directly under the table name. Should you see
any errors, refer to the Q & A section.

14. Create reports based on the loaded data. After the load operation finishes, you can explore the data by
creating custom reports. For examples of common reports, see Data Connector - Example reports.

Related notes
Permissions required to access the Analytics service
Power BI integration overview
Analytics Service security
Authenticate your identity with personal access tokens
Available data tables in the Power BI Data Connector
Data Connector - Example reports

Q&A
Q: How should I read error messages coming from the connector?
A: Reading error messages coming from the connector can be challenging because they typically contain
additional contextual information. If the load operation fails, then the message will start with Failed to save
modifications to the server.... When you see it, then search for [DataSource.Error] VSTS:. The following text is
the real error message returned from the connector.
In the example below the most important part of the error message is:

Query result exceeds maximum size. Please reduce the number of records by applying additional filters.

Q: How do I resolve error: The Analytics Service is in preview and only available to select customers...?
You encountered an error while trying to connect.

The Analytics Service is in preview and only available to select customers of VSTS at this time. If
your account has been enabled please contact the Microsoft employee who set up the service for assistance.

A: Data Connector is built on top of the Analytics Service, which is currently in the preview stage.

Q: How do I resolve error: Query result exceeds maximum size. Please reduce the number of records by
applying additional filters?
A: You will get the following error if the number or records exceeds 200k.
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] VSTS:
Request failed: The remote server returned an error: (400) Bad Request. (Query result exceeds maximum
size. Please reduce the number of records by applying additional filters).'.

This error typically occurs when your project has a lot of work items and you haven't specified filters that would
bring the number of rows to an acceptable level. If you encounter this error then go to step 10. Select relevant
rows and update existing or add more filter steps.

Q: How do I resolve error: The user was not authorized?


The user was not authorized.

A: You can encounter this error if you try to access a team project to which you don't have permissions.

Q: How do I resolve error: Access to the resource is forbidden?


Access to the resource is forbidden.

A: You can encounter this error if you have access to a given project but you do not have the View analytics
permissions. Please work with your project administrator to get these permissions. For more information about
the security model, see Analytics Service security.
Q: How do I resolve error: Project "X" does not exist or you do not have permissions to access it?
We encountered an error while trying to connect.
Details: Invalid "Project" parameter. Project "X" does not exist or you do not have permissions to
access it..

A: This error indicates that the value you entered for Project name does not correspond to any project. A
common mistake users can make is to confuse the team project name with a team name.
If the URL you use on a daily basis is " https://fabrikam-fiber-inc.visualstudio.com/Fabrikam-Fiber-Git/Device ",
then Fabrikam-Fiber-Git is the project name and it should be used in the parameter, whereas Device is the
team name.
Using OData Aggregations with Power BI desktop
9/12/2017 2 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

Currently, Power Query (the underlying technology in both Power BI Desktop and Excel) does not support OData
Aggregation Extensions. However, Power Query is extremely flexible and as such has an easy mechanism for
allowing this content to be used. This article walks you through this process.
In order to use Aggregation Extensions with Power BI Desktop, you must create the URL by hand which requires
knowledge of OData and the Aggreation Extensions specifically. Please review these two topics before continuing.
For the purposes of this walkthrough, we'll create a simple aggregation query which returns the count of work
items by Work Item Type and State. The URL for this query is shown below.

https://[account].analytics.visualstudio.com/DefaultCollection/[project name]/_odata/WorkItems?
$apply=groupby((WorkItemType,State), aggregate(Count with sum as Count))

Execute this query in your browser to make sure it works first. Replace the account and project names with the
appropriate values.
Now that we have the query, it's time to make use of it. Follow these steps to be able to retrieve this data in Power
BI Desktop:
1. Open Power BI Desktop
2. Click Get Data
3. Select Other > Web

4. In the From Web dialog, paste the URL for the query and click OK
5. If prompted for credentials, see the article Client Authentication Options and enter the appropriate
credentials.
The query editor will open and look like the following:

6. Click the list link in the query results.


7. Click To Table from the Transform tab.
8. Click OK on the To Table dialog.

9. Click the Column Expander in the query results.


10. In the Expand dialog, uncheck @odata.id and uncheck the Use original column name as prefix checkbox and
click OK.

This will result in the data being shown, nicely formatted in columns without any extraneous information. At
this point, you can rename the query (on the right under Properties) to something more meaningful but that
isn't required.
11. Finally, change the data type of the Count column from Any to Whole Number.

12. Click Close & Apply from the Home tab.


At this point you can now create charts and graphs based on the data and publish this file to Power BI by following
the topic Publishing Power BI Desktop to Power BI.
Publish a Power BI Desktop file to PowerBI.com
9/12/2017 1 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

Once you've created a Power BI Desktop file and the associated charts and tables, you can share those with others
by creating a dashboard on PowerBI.com. This process walks you through how to do that.
1. Open the Power BI Desktop file with your data.
2. Click Publish on the Home tab.

3. You will be prompted to Sign in or create and if you don't have a Power BI account you can create one.
Click Sign in
If you are already signed in, the dialog will go away and you will see a Publishing to Power BI message.
After the publishing is complete you'll see a success message.

4. Click the Open 'file name' in Power BI link


5. Expand the navigation pane in Power BI and select the work space that you selected when you published
the report.
6. Click Datasets in the upper right corner.
7. Click the ellipsis next to the dataset that represents the report you just loaded (this is typically the file name.
8. Click Schedule Refresh.
9. Click the Edit credentials link next to ODATA under Data source credentials as shown here:

10. Select the appropriate authentication option (as discussed in Client Authentication Options).
11. Use oAuth2 for Azure Active Directory (AAD) credentials.
Use Basic for PAT credentials

See Client Authentication Options for more information on acquiring credentials.


1. Click Sign in.
At this point the data will update on your scheduled basis using the credentials entered.

IMPORTANT
If you are using a Personal Access Token, remember that the token expires on a set interval. When it expires you'll need to
update the credentials. Otherwise the report, while still displaying data, won't update with the latest data.

Related notes
Analytics service overview
Client Authentication Options
Authenticate your identity with personal access tokens
Access data through Excel
Access data throughPower BI desktop
Example reports for Power BI Data Connector
9/12/2017 1 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

Steps are provided to support generating the following example reports:


Number of Work Items
Number of Bugs by Area Path and Priority
Prior to generating these reports, you must first connect to the Analytics Services for VSTS using the Power BI data
connector.

TIP
Use the search box if you are working with tables that contain many columns.

Number of Work Items


1. Load Work Items - Today table with columns: Work Item Count .
2. Select Card visual.

3. Search for Work Item Count and drag it to the Fields .


Number of Bugs by Area Path and Priority
1. Load Work Items - Today table with columns: Area Path , Priority , Work Item Count , Work Item Type .
2. Select Matrix visual.

3. Search for Area Path and drag it to Rows .

4. Search for Priority and drag it to Columns .


5. Search for Work Item Count and drag it to Values .

6. Search for Work Item Type , drag it to Visual level filters and select Bugs .
Related notes
Power BI integration overview
Connect to VSTS with Power BI Data Connector
Available data tables in the Power BI Content Pack
Functions available in Power BI Data Connector
What is available in the Power BI Content Pack for
VSTS
10/25/2017 3 min to read Edit Online

VSTS

IMPORTANT
We are deprecating the Power BI.com Visual Studio Team Services (VSTS) Content Pack on November 15, 2017 primarily
due to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all
existing Power BI.com data sets based on the Content Pack. However, you wont be able to create any new data sets.
The Analytics Marketplace extension and upcoming updates to the Power BI Desktop connector for VSTS are intended to
replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports
Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version
Control. In the interim, you can use VSTS REST APIs as an alternative to the Content Pack to report on these additional data
types.

Power BI Content Pack for VSTS gathers data from different feature areas and combines them into a single
coherent analytical model.

Currently available data


DATA DETAILS

Work Items Current state, trend data, and rollup

Builds XAML builds including build requests, queues and details

Source Control - Git Commits, repositories, pull requests

Source Control - TFVC Changesets, files, file changes and branches

Work with the data model


The data model has several different sets of tables related to main feature areas. These tables are described here
along with their basic measures.
General purpose
TABLE DESCRIPTION

Dataset details Contains information on when the data in Power BI was last
updated and the version of the VSTS connector data model
being used.

Dates Relates to pull requests (Create Timestamp) and work items


(Created Timestamp).
Projects Allows you to determine which project code check-ins and
pull requests happened as well as serving as a filter against all
work items.

Users Detailed user information for use with work items, pull
requests, changesets and commits.

Team Foundation version control


TABLE DESCRIPTION

Branches Information on branches, including branch count.

Changesets Information on changesets including (but not limited to) measures such as the count of changesets,
changesets in the last 30 days, count of changesets by a given author.

File Changes The type of change made against the file (add, change, delete) and associated measures.

Files File path and extension information on checked-in files.

Git
TABLE DESCRIPTION

Commits Information on commits such as the number of files added/deleted/edited, number of projects with
commits and commit counts.

Pull Requests Information on pull requests including age, count, authors and status.

Repositories Information on the repos per project including name, count and by growth and commits.

XAML Builds
TABLE DESCRIPTION

Xaml Build Definitions Build definitions including how the build is triggered.

Xaml Build Queues Information build queues including if they are enabled and their status.

Xaml Build Requests Information on build requests including build duration, percentiles, number of builds, how long the
builds were queued for and retry reasons if the build failed.

Xaml Builds All of the details regarding a build. This includes builds that failed and passed, error codes and
messages, build quality and build durations.

Work Items
All individual work item tables have the following measures:
Count of work items. This column name is the same as the table name. For example the Bugs table has a
measure called "Bugs".
Other tables may include measures specific to that work item type.

TABLE DESCRIPTION
Parent Bugs Contains information relating to bugs and includes Effort, Original Effort, Remaining Work, Size and
Story Points values.

Parent Change Contains information relating to Change requests and includes the Original Estimate value.
Requests

Parent Features Contains information relating to Features and includes Business Value, Days Past Target and Days
Until Target values.

Parent Issues Contains information relating to Issues and includes the Original Estimate value.

Parent Product Contains information relating to Product Backlog Items and includes Business Value and Effort values.
Backlog Items

Parent Requirements Contains information relating to Requirements and includes Original Estimate and Size values.

Parent User Stories Contains information relating to User Stories and includes the Story Points value.

Work Items This table contains all work items, regardless of type. Work items in any table can be filtered or sub-
divided by values in this table. The Work Items count in this table is an overall count and can be
broken down using the Work Item Type field. This table contains all of the System.* fields.

Related notes
Create rollup charts
Create trend charts
Functions available in Power BI Data Connector
9/13/2017 5 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

The Data Connector for VSTS contributes functions which can be used by query authors. For example, VSTS.Feed
adds to the functionality of OData.Feed by handling unique requirements of the VSTS OData feed such as
authentication. We strongly recommend using VSTS.Feed and using the latest version of Power BI when possible.

FUNCTION DESCRIPTION

VSTS.Feed Allows for users to easily execute OData queries against


Analytics in VSTS.

VSTS.Contents Intended for more advanced scenarios, VSTS.Contents returns


the contents downloaded from the URL for the Analytics
Service for VSTS as a binary value.

VSTS.Feed
Allows for users to easily execute OData queries against Analytics in VSTS.
The VSTS.Feed function is similar to the standard OData.Feed function in terms of the arguments it accepts and
the format of the returned value. For more information, see Power Query (M) Formula Reference - OData.Feed.

TIP
If you are already using OData.Feed to access data from VSTS, then just replace it with VSTS.Feed to leverage Data
Connector authentication. This will also inform Power BI that these requests are referencing the same data source and you'll
be able to combine the data without violating the single data source constraints for refreshing data sets in the Power
BI.com.

Arguments for VSTS.Feed


ARGUMENT DESCRIPTION

url A URL to the OData endpoint of the Analytics Service.

options An options record to control the behavior of this function.


Options fields for VSTS.Feed
FIELD DESCRIPTION

MaxSize Controls the max size of the table the client is interested in. If request exceeds this limit then the
server can fail the request immediately. Default value is zero, which tells the server to use its default
value.

Query Programmatically add query parameters to the URL without having to worry about escaping.

ShowHidden Flag which indicates if all tables (including snapshot) should be shown.

ShowOnlyReportingViews Flag which indicates if only EntitySets with IsReportingView annotation should be returned.

Timeout Specifying this value as a duration will change the timeout for an HTTP request. The default value is
600 seconds.

Version Version of the data model. This option is primary for diagnostics.

Examples for VSTS.Feed


Use VSTS.Feed function to count the number of work items in a project.
1. Create a new blank query and click on "Advanced Editor" in the Power BI Query Editor
2. In the editor add the text below to load the feed for fabrikam-fiber-inc account and Fabrikam-Fiber-Git
project using full URL to OData endpoint.
3. Select relevant columns using "Choose Columns", in this case select Count .

Basic Query:

let
Source = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$apply=aggregate($count as Count)")
in
Source

Query with Columns Selected:

let
Source = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$apply=aggregate($count as Count)"),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Count"})
in
#"Removed Other Columns"

Use VSTS.Feed function to load a count of User Stories for each Iteration Path.
1. Create a new blank query and click on "Advanced Editor" in the Power BI Query Editor
2. In the editor add the text below to load the feed for fabrikam-fiber-inc account and Fabrikam-Fiber-Git
project using full URL to OData endpoint.
3. Select relevant columns using "Choose Columns", in this case expand 'Iteration' and select 'Iteration Path' then
select Count .
Basic Query:
let
#"Source" = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$apply=groupby((Iteration/IterationPath), aggregate(Count with sum as Count))")
in
#"Source"

Query with Columns Selected:

let
#"Source" = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$apply=groupby((Iteration/IterationPath), aggregate(Count with sum as Count))"),
#"Expanded Iteration" = Table.ExpandRecordColumn(Source, "Iteration", {"IterationPath"},
{"Iteration.IterationPath"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded Iteration",{"Count", "Iteration.IterationPath"})
in
#"Removed Other Columns"

Use VSTS.Feed function to load detailed information about bugs.


1. Create a new blank query and click on "Advanced Editor" in the Power BI Query Editor
2. In the editor add the text below to load the feed for fabrikam-fiber-inc account and Fabrikam-Fiber-Git
project using full URL to OData endpoint.
3. Select relevant columns using "Choose Columns", in this case select WorkItemID and State .

Basic Query:

let
#"Source" = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$select=WorkItemId,State&$filter=WorkItemType eq 'Bug'")
in
#"Source"

Query with Columns Selected:

let
#"Source" = VSTS.Feed("https://fabrikam-fiber-inc.analytics.visualstudio.com/Fabrikam-Fiber-Git/_odata/"
& "WorkItems?$select=WorkItemId,State&$filter=WorkItemType eq 'Bug'"),
#"Removed Other Columns" = Table.SelectColumns(Source,{"WorkItemId", "State"})
in
#"Removed Other Columns"

VSTS.Contents
Advanced function which returns the contents downloaded from the URL for the Analytics Service for VSTS as a
binary value.
The VSTS.Contents function is similar to the standard Web.Contents function in terms of the arguments it accepts
and the format of the returned value. For more information please refer to: Power Query (M) Formula Reference -
Web.Contents.
TIP
If you are already using Web.Contents to access data from VSTS (REST API or OData), then just replace it with
VSTS.Contents to leverage Data Connector authentication. This will also inform Power BI that these requests are
referencing the same data source and you'll be able to combine the data without violating the single data source constraints
in Power BI Service.

Arguments for VSTS.Contents


ARGUMENT DESCRIPTION

url URL to one of the VSTS service endpoints.

options An options record to control the behavior of this function.

Options fields for VSTS.Contents


FIELD DESCRIPTION

IsRetry Specifying this logical value as true will ignore any existing response in the cache when fetching data.

ManualStatusHandling Specifying this value as a list will prevent any builtin handling for HTTP requests whose response has
one of these status codes.

MaxSize Controls the max size of the table the client is interested in. If request exceeds this limit then server
can fail the request immediately. Default value is zero, which tells the servers server to use its default
value.

Query Programmatically add query parameters to the URL.

RelativePath Specifying this value as text appends it to the base URL before making the request.

Timeout Specifying this value as a duration will change the timeout for an HTTP request. The default value is
600 seconds.

Version Version of the data model. This option is primary for diagnostics.

Related notes
Power Query (M) Formula Reference
Power Query (M) Formula Reference - Accessing data functions
Analytics Service overview
9/12/2017 3 min to read Edit Online

VSTS

NOTE
Feature availability: The Analytics Marketplace extension is available to all VSTS accounts and provides access to several
useful
widgets, such as Cumulative Flow, Velocity, and Lead and Cycle Time. The Analytics OData endpoint, which provides a
concise model over the VSTS suite for Work Item Tracking, Test, Version Control, and
Build, is in a closed preview and only available to select VSTS customers at this time.
If you are looking for information about the Azure Analysis Services, see Azure Analysis Services or What is Azure Analysis
Services?.

The Analytics service provides a concise OData model over the VSTS suiteWork Item Tracking, Test, Version
Control, Release and Build. You can use it to answer quantitative questions regarding past or present state and
velocity of your projects. It is built upon a near real-time reporting warehouse hosted in the cloud and optimized
for fast read-access and support of server-based aggregations.
You can learn more from one of these topics:

BASICS CLIENT ACCESS QUERY ACCESS EXTENSIONS

- Data model - Client authentication - WIT analytics - Hub extension


- Security options - Analytic recipes - Dashboard widget
- Excel - Aggregated data - Add configuration
- Power BI desktop - Query for trend data
- PowerBI.com - Work item links
- Power BI desktop and
OData aggregations
- Create custom calculation

Available data
For more information about the following entities, see data model.
Areas
Dates
Iterations (including start/end dates)
Kanban data
Links:
Parent/child link relationships New!
Related links New!
Work Item Snapshots for trend reporting
Work Item Board (Kanban) Snapshots for trend reporting
Tags New!
Team projects
Teams (including owned areas/iterations)
User information for work item fields (Assigned To, Created By, etc.) New!
Work items
Work item revisions
Custom fields New!

Supported entities and metadata


This information can also be found by going to the service root url endpoint. The endpoint is:
AccountName .analytics.visualstudio.com/DefaultCollection/_odata

So, for the FabrikamFiber account:

fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata

NOTE
The OData Analytics Service URL is case sensitive.

Accessing this URL returns a metadata document similar to the following:

"@odata.context":"https://fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata/$metadata","value"
:[
{
"name":"WorkItems","kind":"EntitySet","url":"WorkItems"
},{
"name":"WorkItemRevisions","kind":"EntitySet","url":"WorkItemRevisions"
},{
"name":"WorkItemSnapshot","kind":"EntitySet","url":"WorkItemSnapshot"
},{
"name":"WorkItemBoardSnapshot","kind":"EntitySet","url":"WorkItemBoardSnapshot"
},{
"name":"WorkItemLeadTimes","kind":"EntitySet","url":"WorkItemLeadTimes"
},{
"name":"Dates","kind":"EntitySet","url":"Dates"
},{
"name":"Projects","kind":"EntitySet","url":"Projects"
},{
"name":"Iterations","kind":"EntitySet","url":"Iterations"
},{
"name":"Areas","kind":"EntitySet","url":"Areas"
},{
"name":"Tags","kind":"EntitySet","url":"Tags"
},{
"name":"Teams","kind":"EntitySet","url":"Teams"
},{
"name":"BoardLocations","kind":"EntitySet","url":"BoardLocations"
},{
"name":"WorkItemLinks","kind":"EntitySet","url":"WorkItemLinks"
},{
"name":"Users","kind":"EntitySet","url":"Users"
}
]
}

To access detailed metadata, add $metadata to the end of the URL:


https://fabrikamfiber.analytics.visualstudio.com/DefaultCollection/_odata/$metadata

This returns a fully qualified XML document which describes all entities, fields, and relationships.

OData
OData supports access to the Analytics service through an OData v4 interface with aggregation extensions.
Currently, updates are pulled from the operational store every 15 minutes. Our goal is to reduce this to 30
seconds using a push model; we aren't there yet.
For details and examples on using OData with the Analytics Service, see WIT analytics.

Supported OData functions


The following table summarizes the supported and unsupported OData functions.

NOTE
OData aggregation extensions are relatively new and either not supported by various client tools (yet) or full support for the
extension is not supported by the Analytics Service.

IMPLEMENTED NOT IMPLEMENTED


- $count (not in aggregation extensions) - concat
- $apply (partially) - $search
- $aggregate - $rollup
- groupby - isdefined
- filter - $crossjoin
- average - now
- countdistinct - topcount
- max - topsum
- min - toppercent
- sum - bottomcount
- $filter - bottomsum
- $expand - bottompercent
Canonical functions:
- contains
- endswith
- startswith
- length
- indexof
- substring
- tolower
- toupper
- trim
- concat
- year
- month
- day
- hour
- minute
- second
- fractionalseconds
- date
- time
- totaloffsetminutes
- maxdatetime
- mindatetime
- totalseconds
- round
- floor
- ceiling
- isof
- cast

You use OData functions in a filter clause, but not in a $select clause the way that you would use them in a
SQL statement.
For example, you can specify:

/WorkItems?$filter=toupper(Title) eq 'HELP'

However, you can't enter the following:

/WorkItems?$select=WorkItemId,State,toupper(Title)

Related notes
NOTE
The Analytics Service is on a 15 minute refresh schedule.

WIT analytics
Aggregate data
OData Version 4.0 Part 2: URL Conventions Plus Errata 02
Dashboards
10/18/2017 1 min to read Edit Online

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013


Start gaining visibility into how your team is progressing by adding one or more widgets to your dashboard. Each
team can customize and configure dashboards to share information and monitor their progress.

5-Minute Quickstarts
Add and manage dashboards
Add charts and widgets to a dashboard
Add Markdown to a dashboard

Step-by-Step Tutorials
Configure a Cumulative Flow chart
Configure a Lead Time or Cycle Time widget
Configure or view Velocity chart
View sprint burndown charts

Concepts
Cumulative flow, lead time, and cycle time guidance
Velocity metrics and usage guidance
Burndown guidance

How-to Guides
Add charts to a dashboard
Configure work item query-based charts
Configure test status, progress, and result charts
Set dashboard permissions

Reference
Widget catalog

Resources
Build a dashboard widget
Marketplace widgets