Count of defects created in a sprint by status and priority

Hi,
I want to create a report which returns the count of defects created after the sprint start date and before sprint completion date, broken down by status and defect priority (a custom field).

Below is the query I’ve used to create a new calculated measure, but although the report shows the correct count of defects in the “None”, it is returning the same value in every cell, which is incorrect.

nonzero(count(
Filter(Descendants([Issue].CurrentMember,[Issue].[Issue]),
DateBetween(
[Measures].[Issue created date],
[Measures].[Sprint start date],
[Measures].[Sprint complete date]
)and
[Measures].[Issue type]=“Defect”
)
))

Is there something missing in the statement? Please advise.
Thanks.

Hi @tamk,

Your approach on how to count issues with specific criteria is correct. However, the calculated measure does not work as expected because a reference to another numeric measure is missing in the formula.
A measure binds data together and allows to represent data from different points of view (Dimensions). Therefore, each calculated measure should contain at least one already existing measure to get the context of dimensions used in the report. The measure is a treasure!

To make this calcaultion work, you may add one more filtering criteria containing measure Issues created:

...    
AND
([Measures].[Issues created],
[Sprint].CurrentHierarchy.DefaultMember) > 0
...

I would suggest using an alternative formula to count all defect reported during a selected sprint; this calculation might be a bit faster:

Sum(
  -- set of dates while sprint was active
  Filter(
    [Time].[Day].Members,
    [Measures].[Time within sprint] > 0 ), 
  -- value of created bugs during each date regardles in which sprint issue was included later
  ([Measures].[Issues created],
  [Sprint].CurrentHierarchy.DefaultMember,
  [Issue Type].[Defect])
)

Best,
Zane / support@eazyBI.com