Atlassian apps / Almanac / Guides
Jira cycle time in Power BI
Cycle time is how long work takes once somebody has started it.
Jira knows every move an issue made, but a list of issues does not show it. Almanac hands Power BI the moves as a table, so cycle time is a sum and not a puzzle.
A ready template holds the charts of this guide: Start from the template.

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
- Connect Power BI Desktop to the feed. Connect Power BI in the documentation shows each step.
- In the list of tables tick StatusHistory and Issues, and choose Load.
2. Join the two tables
Power BI does not join these two tables by itself, because the two columns have different names.
- Open the Model view.
- Drag
Issue_Keyof StatusHistory ontoKeyof Issues. Issues lists every field of your site in alphabetical order, so scroll its card down toKeyfirst. - Power BI opens a window named New relationship with the two columns chosen. Check that Cardinality reads Many to one (*:1) and Cross-filter direction reads Single, and choose Save.
Each issue has many rows of history, so the join is many to one.
3. Know the table
StatusHistory has one row for each stay of an issue in a status.
| Column | What it holds |
|---|---|
| Issue_Key | The issue |
| Status | The status it was in |
| Entered | When it came into that status |
| Left | When it left. Empty for the status it is in now |
| Seconds | How long the stay lasted. For the status it is in now, up to the last refresh |
| Is_Current | True for the status it is in now |
| History_Complete | False where Jira could not give the issue’s whole history |
The table also carries Issue_Id, Status_Id and Stay, the number of the stay within its issue.
Time is counted around the clock. Nights and weekends are in it.
4. Where work waits
Make these three measures. For each one choose New measure, paste the formula and press Enter.
Days in status = DIVIDE(SUM(StatusHistory[Seconds]), 86400)Issues counted = DISTINCTCOUNT(StatusHistory[Issue_Key])Average days in status = DIVIDE([Days in status], [Issues counted])Power BI lists a new measure in the Data pane, under the table that was selected when you made it.
Add a bar chart with Status on the axis and Average days in status as the value. Take Status from StatusHistory: Issues has a column of the same name.
Drag Left onto Filters on this visual. In its card set Filter type to Advanced filtering, choose is not blank and choose Apply filter. The chart then counts the stays that have ended: the status an issue is in now is still running, and the one finished issues end in would be the longest bar on any site. The longest bar is where work waits longest.
5. Cycle time
Decide which statuses count as work under way. The names below are examples: use your own.
Cycle days =
CALCULATE(
DIVIDE(SUM(StatusHistory[Seconds]), 86400),
StatusHistory[Status] IN { "In Progress", "In Review" }
)Average cycle days =
AVERAGEX(
FILTER(VALUES(Issues[Key]), NOT ISBLANK(CALCULATE(MAX(Issues[Resolved])))),
[Cycle days]
)Add a line chart with Resolved of Issues on the X-axis and Average cycle days on the Y-axis. Power BI puts a date on the axis as a hierarchy of year, quarter, month and day, and shows years first. To see months, remove Quarter and Day from the X-axis, then press the forked arrow above the chart, Expand all down one level in the hierarchy. The chart shows whether finished work is getting faster or slower.
An issue that was resolved without ever standing in one of the statuses you named is left out of the average.
6. Lead time
Lead time runs from the day an issue was made to the day it was resolved.
Average lead days =
AVERAGEX(
FILTER(Issues, NOT ISBLANK(Issues[Resolved])),
DATEDIFF(Issues[Created], Issues[Resolved], HOUR) / 24
)7. What is stuck now
- Add a table with
Issue_Key,StatusandEnteredof StatusHistory, andDays in status. - Power BI adds
Enteredas a date hierarchy. In the Columns list, open the arrow besideEnteredand choose Entered, to see the date and the time. - Drag
Is_Currentonto Filters on this visual and tick True. - Drag
Status_Categoryof Issues onto Filters on this visual too, and tick every category but Done. A finished issue sits in its last status for good, and this leaves those out. - Click the heading of
Days in statusto sort by it, longest first.
These are the unfinished issues that have sat longest where they are.
Good to know
- Every time arrives in the time zone chosen on Almanac’s page.
- To count only issues whose whole history is known, filter to
History_Completeis true. - Slice any of these by project, issue type or assignee: they are columns of Issues.