Is there a way to set a condition to filter with measures?

Hello all,
I’m currently using jira and eazybi for reports
what i want to calculate story points of issues but with a condition that if the issue is a parent (has a subtasks) to calculate the story points of subtasks only and if it is a task without subtasks to calculate the story point of this task

Any help ?

Hi @Enjy_Essam,

Yes, you may write the calculated measure with several conditions on how to aggregate story points for a different issue type and other issue criteria. For conditions, you might want to use expression CASE WHEN … THEN … END. The formula might look like this:

CASE WHEN --issue has sub-tasks and is not a Task
  NOT IsEmpty([Measures].[Issue sub-task keys]) AND
  [Measures].[Issue type] <> "Task"
THEN
  Sum(
    --get sub-taks of an issue
    [Issue].[Issue].GetMembersByKeys(
      [Measures].[Issue sub-task keys]),
    --sum up SP of sub-tasks
    [Measures].[Story Points created] )
ELSE --for the rest of issues including Tasks and sub-tasks show assigned SP
  [Measures].[Story Points created]
END

If you like, you may update this expression and add more conditions WHEN … THEN. More details on the conditions are here: https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members/calculated-measures#Calculatedmeasures-Conditions

Here is some conversation on related topics:


Best,
Zane / spport@eazyBI.com