All Epic children worklogs based on Epic custom field

Hi,

I’m a newbie with eazyBi :slight_smile:
I am trying to get all the hours under Epic based on a Country custom field, then I can draw a pie of Countries with all the related worklogs (hours).
Can you please help me understand what’s wrong here?

My hierarchy is simple: Epic + sub-tasks > Tasks + sub-tasks.
Hence worklogs can be set on Epic, Epic’s sub-tasks, Epic tasks, or Epic tasks’ sub-tasks levels.

Now in Epic, I have a custom field named Country.
This Country field is imported as Dimension and Property.

I created a new measure, and first thought it properly worked, but it is not the case…

Sum(
  Filter(
    DescendantsSet([Issue.Epic].CurrentHierarchyMember,[Issue.Epic].[Parent]),
    DefaultContext(
      ([Measures].[Hours spent with sub-tasks],
      [Issue.Epic].CurrentHierarchyMember.Parent,
      [Country].CurrentHierarchyMember)
    ) > 0
  ),
  ([Measures].[Hours spent with sub-tasks],
     [Country].DefaultMember)
)

The goal is to have a simple table with Country + Total Hours Spent by Country

… To check, I brought in the Issus dimension as Row (selecting Epic in all hierarchy level members), and add another measure to calculate the total worklogs, I can see the discrepancies and that I have much more Epics. This measure seems to return all hours properly from Epic + any level of its child issues.

CASE
WHEN
  [Issue].CurrentHierarchyMember.level.Name = "Epic"
AND
  ([Issue Type].[Epic],
   [Measures].[Issues created],
   [Time].Currenthierarchy.DefaultMember)>0
THEN
  Sum([Issue].CurrentHierarchyMember.Children,
    ([Measures].[Hours spent with sub-tasks],
     [Country].DefaultMember))
  +
  nonzero((
    [Measures].[Hours spent],
    [Issue Type].[Epic]
  ))
END
Number of issues created Total Hours Spent by Country Total hours spent by Epic
Portugal PRJ-1 13 40.00 48.50
PRJ-2 4.00 4.00
United Kingdom PRJ-3 3.00
PRJ-4 28 41.05 42.55
PRJ-5 3 6.00
PRJ-6 9.00
PRJ-7 21.00 21.00
PRJ-8 1 6.00 11.33
PRJ-9 1
PRJ-10 2 0.50
PRJ-11 9 13.25
PRJ-12 3 41.00 41.00
PRJ-13 1 2.00
France PRJ-14 8 72.00 72.50
PRJ-15 11 32.25 32.25
Belgium PRJ-16 13 40.00 48.50
Poland PRJ-17 12 5.67 10.67
PRJ-18 1
Germany PRJ-19 4 12.00
PRJ-20 4 7.75 13.75
PRJ-21 2 8.00

Gaps with Total Hours Spent by Country:

  • It does not include Epic hours, but only it’s child issues hours!
  • It does not include All child issues hours sometimes (PRJ-3 …, PRJ-13, etc.)

I really hope that someone can help me, thank you!

Answered in https://community.eazybi.com/t/filtered-epics-child-issues-sub-tasks-hours/14175

Thank you Elita.Kalane!

1 Like