Hi Majken,
Yes, you are right, the two formulas provided in the linked thread take into account if the issue was part of the sprint while the hours were logged. To calculate Hours spent during Sprint time for issues that have ever been part of that Sprint, ignoring if they were part of the Sprint when the hours were logged, please try the following calculated Measure
NonZero(SUM(Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
([Measures].[Transitions to],
[Time].CurrentHierarchy.DefaultMember) > 0),
SUM(
Filter(Descendants([Time].CurrentMember, [Time].[Day]),
[Measures].[Time within Sprint] > 0 ),
NonZero (([Measures].[Hours spent],
[Issue].CurrentMember,
[Sprint].DefaultMember))
)
))
Lauma / support@eazybi.com