Filtering on Program Increment at Epic Link level

Hi @sanjeevnarula,

The most convenient approach to filter Stories by Epic fields is by useing issue linked field dimensions , like Epic Label, Epic Fix Version, and other. There are more details, how to create those dimensions: https://docs.eazybi.com/eazybijira/data-import/advanced-data-import-options/issue-link-field-dimensions.

Such linked field dimension could be create also for other Epic fields as long as field is a single-select custom field. In that case, you may define a new JavaScript calculated custom field that would return custom field value and pass it down to epic child issues. There are more details on JavaScitp calculated custom fields and how tot est them beforehand: https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields
The structure for JavaScript calculated custom file might look like this, where NNNNN is custom field ID in Jira:

[jira.customfield_NNNNN_e]
name = "Epic Custom field"
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
javascript_code = '''
if(issue.fields.customfield_NNNNN && issue.fields.customfield_NNNNN.value) {
  issue.fields.customfield_NNNNN_e = issue.fields.customfield_NNNNN.value;
}
'''

, where NNNNN is a custom field ID in Jira.

If there is no option to create a linked field dimension or JavaScript calculated custom field, you may define a new calculated measure for the report. The calculated measure would go through all issues and change the context of the custom field dimension, in your case, “Program Increment”.
The formula for calcaulted measure that counts created issues by "Progrma Increment: of linked epic might look like this:

--annotations.drill_through_non_empty=false
Nonzero(Count(
  --set of issues
  Filter(
    --go throug all issues ignoring assigned Program Increment
    Descendants([Issue].CurrentMember,[Issue].[Issue]),
    ([Measures].[Issues created],
    [Program Increment].CurrentHierarchy.DefaultMember) > 0 AND
    --get the Program Increment value of linked Epic
    DefaultContext((
       [Measures].[Issues created],
       [Program Increment].CurrentHierarchyMember,
       [Issue.Epic].[Epic].GetMemberbyKey([Issue].CurrentHierarchyMember.get('Epic Link')),
       [Issue Type].[Epic]
    )) > 0
  )
))

Best,
Zane / support@eazyBI.com