Matching the status

Hello! I’m trying to use a CASE statement to match against an epic’s status:

CASE WHEN
DateCompare([Time].CurrentHierarchyMember.StartDate, now()) < 0
THEN
CASE WHEN
[Status].[Status].GetMemberNameByKey([Issue].CurrentHierarchyMember.get(‘Status’)) = “To Do”
–[Issue].CurrentHierarchyMember.get(‘Status ID’) = “To Do”
–[Status].CurrentMember.name = ‘TO DO’

THEN
[Measures].[Open issues]*14.8
ELSE
[Measures].[Open issues]*7.4
END
END

I’ve had no luck with executing those statements- could you help with this?

Hi @neilarm,

This expression would work only when individual issues are on report rows because it checks the status of each visible issue.

  1. To make this work, you might want to import “Epic Status” as a separate dimension so that eazyBI could check on related epic status instead of issue status.
    Please see how to import epics status as dimension here: Issue link field dimensions.

  2. Update the calculation using the new link field dimension “Epic Status”. Now you can sum up the open issues with respective coefficients according to each epic status

    --for epics in To Do status, use coefficient 14.8
    ([Measures].[Open issues],
    [Epic Status].[To Do]) * 14.8
    +
    --for the rest of the epics use coefficient 7.4
    Sum(
      --all epic issue statuses except for To Do
      Except(
        [Epic Status].[Status].Members,
        [Epic Status].[To Do]
      ),
      [Measures].[Open issues] * 7.4
    )
    

Best,
Zane / support@eazyBI.com