Nebular Labs

Atlassian apps / Almanac / Guides

Jira sprint report and velocity in Power BI

Jira’s sprint report says what a team committed to, what was added and removed on the way, and what got done.

Almanac works the same figures out for every sprint and hands them to Power BI as two tables. They match Jira’s own report: they were held against it sprint by sprint.

A ready template holds the charts of this guide: Start from the template.

The template’s Sprint report page: one sprint’s committed, added, removed, completed and not completed issues, and the issues of the sprint with how each ended.
(what this guide builds, as the template has it, on sample data)

What you need

  • Almanac installed on your Jira site, with its first sync finished.
  • Power BI Desktop.
  • The feed’s address and password, from Almanac’s page in Jira’s settings.

1. Connect

  1. Connect Power BI Desktop to the feed. Connect Power BI in the documentation shows each step.
  2. In the list of tables tick Sprints and SprintIssues, and choose Load.

2. Join the two tables

Power BI joins the two tables by itself when they load, on Sprint_Id. In the Model view, check that a line runs between them. If it does not, drag Sprint_Id of SprintIssues onto Sprint_Id of Sprints. In the window that opens, set Cardinality to Many to one (*:1) and choose Save. Each sprint has many issues, so the join is many to one.

3. Know the tables

Sprints has one row for each sprint.

ColumnWhat it holds
Sprint, StateIts name, and whether it is future, active or closed
BoardThe name of its board
Started, Planned_End, CompletedIts dates
Issues_At_StartEverything in the sprint when it started, done or not
Committed_Issues, Committed_PointsWhat the team took on: in the sprint at its start, not done
Added_Issues, Removed_IssuesWhat came in after the start, and what was taken out
Completed_Issues, Completed_PointsWhat was in the sprint at its end and done
Completed_Outside_IssuesWhat was done, but not while in the sprint
Not_Completed_IssuesWhat was left when it closed
Board_KnownFalse for a sprint on a board Almanac cannot read: no points

SprintIssues has one row for each issue of each sprint: Issue_Key, whether it was Committed, Added or Removed, its Outcome (Completed, Completed outside, Not completed or Removed), and its points at the start and at the end.

Both tables carry Sprint_Id, the column that joins them. Sub-tasks are in neither table, as in Jira’s own report.

4. Velocity

Make these four measures. For each one choose New measure, paste the formula and press Enter.

Committed points = SUM(Sprints[Committed_Points])
Completed points = SUM(Sprints[Completed_Points])
Done of committed = DIVIDE([Completed points], [Committed points])
Average velocity =
AVERAGEX(
    FILTER(Sprints, Sprints[State] = "closed"),
    Sprints[Completed_Points]
)

Power BI lists a new measure in the Data pane, under the table that was selected when you made it.

  1. Add a clustered column chart with Sprint on the X-axis, and Committed points and Completed points on the Y-axis.
  2. Drag State onto Filters on this visual and tick closed.
  3. To put the sprints in the order they ran, select the Sprint column in the Data pane, choose Sort by column on the Column tools tab, and pick Started. Power BI refuses this when two of your sprints share a name, and a chart adds the figures of such sprints together: the template keeps them apart.
  4. A new chart is sorted by its tallest column. In the chart’s More options menu, the three dots at its corner, choose Sort by, then Sprint. Open the menu again and choose Sort by, then Sort ascending.

This is Jira’s velocity chart, for as many sprints as you like.

The template’s Velocity page: average velocity, the share of committed points that were done, and committed and completed points for every closed sprint.
(the template’s Velocity page, on sample data)

5. One sprint’s report

  1. Add a slicer on Sprint.
  2. Add a card, and tick Committed_Issues, Added_Issues, Removed_Issues, Completed_Issues and Not_Completed_Issues for it.
  3. Add a table with Issue_Key, Outcome, Points_At_Start and Points_At_End of SprintIssues. In the Columns list, open the arrow beside each of the two points columns and choose Don’t summarize. Power BI sums them otherwise, and a table of sums leaves out every issue that has no points.

Pick a sprint in the slicer, and the page is that sprint’s report.

6. Scope change

Scope change =
DIVIDE(
    SUM(Sprints[Added_Issues]) - SUM(Sprints[Removed_Issues]),
    SUM(Sprints[Committed_Issues])
)

A sprint far above zero grew after it started.

Good to know

  • Points are read in the field each board estimates in.
  • Nobody’s personal API token is used: the figures are worked out from each issue’s history.

An issue’s fields beside its sprint

To see a field of Issues beside a sprint’s issues, load Issues too. Power BI then joins Issues to Sprints by the sprint’s name, by itself. That join has to go: SprintIssues is the table that says which issue was in which sprint, and with both joins in place Power BI refuses the next one as ambiguous.

  1. In the Model view, choose Manage relationships on the Home tab.
  2. Tick the join from Issues to Sprints and choose Delete.
  3. Drag Issue_Key of SprintIssues onto Key of Issues. Issues lists every field of your site in alphabetical order, so scroll its card down to Key first.
  4. In the window that opens, set Cardinality to Many to one (*:1) and Cross-filter direction to Single, and choose Save.

Power BI proposes One to one there for as long as none of your issues has been in two sprints. A join saved as one to one makes the refresh fail as soon as one is.