Trying to count % epics on time

Hi everyone,
I am trying to calculate % of epics that have ‘target end’ date later than ‘due date’ where rows are themes.
My jira hierarchy is theme>initiative>epic>story.
We use plans.

Hi @Arpita_Solanki ,

​If you are displaying the Theme dimenson on report rows and using the Parent/Plans hierarchy (previously Advanced Roadmaps hierarchy) on your instance, the expression might be as follows.

CASE WHEN
--there are epics related to the current context
 ([Measures].[Issues created],
  [Issue Type].[Epic],
  [Time].CurrentHierarchy.DefaultMember)>0
THEN
 Sum(
   Filter(
     DescendantsSet(
--going from Theme level of Parent hierarchy
       [Issue.Plans].[Theme].GetMemberByKey(
         [Theme].CurrentHierarchyMember.Key),
--to the Epic level
       [Issue.Plans].[Epic]
     ),
--filter conditions for Epics
    DateCompare(
      [Measures].[Issue due date],
      [Measures].[Issue target end]
    )>=0
   ),
--numeric value for Sum
--number of epics related to the rest of report context, ignoring Time
   ([Measures].[Issues created],
    [Issue Type].[Epic],
    [Time].CurrentHierarchy.DefaultMember)
 )
 /
--divided by total number of relevant epics under the Theme 
 ([Measures].[Issues created],
  [Issue Type].[Epic],
  [Time].CurrentHierarchy.DefaultMember) 
END

​This will return the percentage of Epics with Due date after Target end date for the current Theme.

​However, you might have some more specific conditions like “due date of Epic, but Target end date of Theme” and there might be further clarification of whether epics are created within the specific time period, completed within the specific time period, their target date or end date are in the specific time period.

​These additional details might change the expression.

​Please provide more specific requirements so we can adjust the expression accordingly.

​Regards,
​Oskars /suport@eazyBI.com