Gantt chart

This example will show how to create Gantt charts with Jira data.

The main attribute of any Gantt chart is Start and End date. You would like to use some measure representing date as the first two columns for your Gant chart. You could use date properties. For example, Issues, Sprints, and Fix versions has date properties you can use on Gant chart as Start date and End date.

For a simple Issue Gantt chart that is visible below, Issue created date and Issue status updated date measures are used as Start date and End date. 

This report uses Issue epic hierarchy representing open epics and issues in open epics. Report uses calculated measure "Issue epic link status" as a filter. This measure represents status of an epic for epic itself and any sub-level issues.

CASE 
  WHEN 
    [Measures].[Issue type] = 'Epic'
  THEN
    [Status].[Status].GetMemberNameByKey(
      [Issue].CurrentHierarchyMember.get('Status ID'))
  WHEN 
    [Issue type].[Issue type].getMemberByKey(
      [Issue].CurrentHierarchyMember.get('Issue type ID'))
    .getboolean('Subtask')
  THEN 
    [Status].[Status].GetMemberNameByKey(
      [Issue].[Issue].GetMemberByKey(
        [Issue].[Issue].GetMemberByKey(
          [Issue].CurrentHierarchyMember.get('Parent issue key'))
        .get("Epic Link"))
      .get('Status ID'))
  ELSE 
    [Status].[Status].getMemberNameByKey(
      [Issue].[Issue].GetmemberByKey(
        [Issue].CurrentHierarchyMember.get('Epic Link'))
      .get('Status ID'))
END


Progress of a task can be visualised with colours:

  • blue - upcoming tasks and completed tasks without completion ratio;
  • green - completed tasks with completion ratio (%);
  • red - overdue tasks with completion ratio (%);
  • grey - a group of tasks.

To get the progress of issues there is a custom measure Issue resolved % defined with formula

CASE WHEN
  [Measures].[Issues created] > 0
THEN
  [Measures].[Issues resolved]
  /
  [Measures].[Issues created]
END

Define the formatting of the measure to Integer percentage %, the % part of the line will be coloured accordingly.

Issue created date is an example of what can be used to specify Start date. Different custom date fields, if they are defined in Jira, can be used as a Start date. For example Planned issue start date could already be defined as Issue property. As well the last date issue should be started to have it finished on Due date could be calculated with formula where Original estimated hours are divided by 8 to get number of working days that is subtracted from Issue due date.

DateAddWorkdays([Measures].[Issue due date], 
  - [Measures].[Original estimated hours] / 8
)

Similar report can be created to show Sprint progress. You can create below visible Gantt chart if you are using Jira Agile Sprint and Story Points custom fields.

This chart uses Sprint custom dimension on rows and Sprint Start and End date measures on columns.

Following formula is used to calculate Story points completed % for each sprint

CASE WHEN 
  [Measures].[Story Points created] > 0 
THEN
	([Measures].[Story Points created] 
	- [Measures].[Story Points due])
  / [Measures].[Story Points created]
END