How to build an expression for calculating % of stories in an epic in particular status

This article helps in building an expression for calculating the percentage of an issue's status/statuses and using that in a report to get the percentage for stories in an epic.

Instructions

To get the percentage of the statuses, create two calculated fields as shown below:

  1. Navigate to Jira Menu → AIO Reports → My Area → My Calculated Fields. 
    Note: Access to the app is controlled by the Access Permissions option, which is accessible only to a Jira administrator. If the group they belong to is not selected, users will not see the AIO Reports menu item. In this case, the Jira administrator can perform the below steps:
  2. Click Create New Field to create a new calculated field.

  3. From the right-hand side, search for the function IF ELSE and drag the function to build the expression:


  4. Also, drag the function EQUALS and place it within the condition:


  5. Now drag the Current Status field to value1.
  6. For value2: Click "Enter a constant value" and input the Statuses as values:

  7. For the rest of the value1 and value2 fields: Fill up with values as value1 = 1 and value2 = 0 and name the calculated field as shown below:


  8. Now, create another calculated field for calculating the % of the Accepted. Build the expression as shown below:


  9. Create a report of type Matrix and place the Epic Name, Issue Key on the Row fields(Dimensions), Current Status on Column fields(Dimensions) & Accepted%Accepted field on Data fields(Measures):



    In this example, the calculation for the Total will be carried out as ((3/8)*100)/1 = 37.5%.