Delivered issues over time: wrong mapping over time period

Hi,

I’m trying to plot a set of issues which have been delivered over time. Cause of some very specific requests I need to use a lot of filters in my calculated measure.

The below example holds 2 similar measures, for one I’m receiving the expected result, but for the 2nd I’m seeing some unexpected results.

For both the measures, the following filters are common:

  • I need to filter all the tickets created AFTER the 13th of October
  • I only should include tickets which are now of issue type Tech Epic or Tech Story (a large set has been converted to other issue types and should be discarded, hence the extra filter).

For the 1st set I need to count a set of issues which have transitioned into 1 a specific state (reached “Ready for Handover”)
→ OK, this works as expected

NonZero(Count(
  Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
  DateBetween(
    [Measures].[Issue created date],
    '13 Oct 2022',
    'today'
  ) AND
  (([Measures].[Transitions to status issues count],
[Transition Status].[Ready for Handover]
)>0) --checks if issue went to Ready for Handover
AND
    (
    [Measures].[Issue type] = "Technical Epic" 
    OR
    [Measures].[Issue type] = "Technical Story"
    )
)
)))

The 2nd set has the same requirements, additionally

  • It looks for tickets which are in the status 'Closed" WITHOUT going through handover status
NonZero(Count(
  Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
  DateBetween(
    [Measures].[Issue created date],
    '13 Oct 2022',
    'today'
  ) AND
  IsEmpty(([Measures].[Transitions to status issues count],
[Transition Status].[Ready for Handover]
)) --checks if status has skipped
AND
   ([Measures].[Issue status] = "Closed")
AND
    (
    [Measures].[Issue type] = "Technical Epic" 
    OR
    [Measures].[Issue type] = "Technical Story"
    )
)
)))

The outcome, when plotting both against time:

  • Column “Closed but not delivered” covers set 2: it has the right set of issues, but is returning unexpected values across all periods - I only would expect values from Oct 22 onwards, and not yet in 2024, nor in 2018, 2019,… as tickets have only been created after 13/oct/2022 - so it’s not possible these have been delivered years before - also it keeps returning the same numbers
  • Column Ready for handover covers set 1: the expected amount of issues, and the plotting over time matches the delivery dates

image

Any idea what I’m doing wrong in my calculations?

Hi @Stijn,

Since you are filtering issues by their properties - the filter for creation date always returns the set of all issues created between 13 Oct 2022 and today.

The same set of issues is returned for any date in the report context.

If you want your calculated measures to relate to the selected context - like report pages or displayed dimensions - you might filter by the actual imported measures like issues created, issues resolved, etc. in the calculations and conditions.

The point to consider is if you want to allocate issues to the Time periods when these issues were created, when they have been transitioned to “Ready for Handover” of when they were closed/completed./resolved.

The current version of the first expression displays the issues that have transitioned to “Ready for Handover” in the displayed member of the Time dimension regardless of issue creation date as long as the issue was created after 13 Oct 2022. This might lead to the same issue being reported multiple times if it gets transitioned to Ready for Handover multiple times.

The current version of the second expression returns all issues that were created after 13 Oct 2022 that have not transitioned to “Ready for Handover” in the displayed Time dimension member, regardless of their closure or resolution date and regardless of the relation of their creation date to the displayed Time dimension member.

The issues that have NOT been transitioned to “Ready for Handover”, have to be grouped by their creation or closure date.
However, the name of the measure “…closed but not delivered” hints that you might be looking for the issue closure date as the date to group the issues.

If you want only to see the issues created within the displayed Time dimension member AND after 13 Oct 2022 - you need to add an extra condition - the issue was created in the displayed period.

The condition might be as follows.

DateInPeriod(
 [Measures].[Issue created date],
 [Time].CurrentHierarchyMember)

If you want to see the issues that were resolved within the selected period, you might use the following condition.

DateInPeriod(
 [Measures].[Issue resolution date],
 [Time].CurrentHierarchyMember)

Depending on how you define issue closing - it might be issue resolution date or issue closed date. If you use the transitions to specific statuses instead of a resolution to mark issue completion - you need to set up these statuses in data import settings. Please read more about that here - Issues closed measure.

The updated expressions based on more detailed requirements might be as follows.

The number of issues that were created after 13 Oct 2022, resolved within the displayed period, that have one of the two issue types and have gone to Ready for Handover at any point in time .

NonZero(Count(
 Filter(
--set of issues
  DescendantsSet(
   [Issue].CurrentMember,
   [Issue].[Issue]),
--condition 1 created after 13 Oct 2022
   DateBetween(
    [Measures].[Issue created date],
    '13 Oct 2022',
    'today'
   )
AND
--condition 2 transitioned to Ready for Handover anytime in history
 (
  ([Measures].[Transitions to status issues count],
   [Transition Status].[Ready for Handover],
--resetting the Time dimension
   [Time].CurrentHierarchy.DefaultMember)
  >0) --checks if issue went to Ready for Handover
AND
--condition 3 - current issue type one of not-converted
  (
   [Measures].[Issue type] = "Technical Epic"
    OR
   [Measures].[Issue type] = "Technical Story"
  )
 AND
--condition 4 - linked to Time dimension by resolution date
--also filters for other context - other dimensions
   [Measures].[Issues resolved]>0
  )
))

The number of issues closed within the displayed period , that were created after 13 Oct 2022, that have one of the two issue types and have not gone to Ready for Handover at any point in time .

NonZero(Count(
 Filter(
--set of issues
  DescendantsSet(
   [Issue].CurrentMember,
   [Issue].[Issue]),
--condition 1 created after 13 Oct 2022
  DateBetween(
    [Measures].[Issue created date],
    '13 Oct 2022',
    'today'
    )
  AND
--condition 2 - NOT transitioned to Ready for Handover anytime in history
  NOT(
   ([Measures].[Transitions to status issues count],
    [Transition Status].[Ready for Handover],
--resetting the Time dimension
    [Time].CurrentHierarchy.DefaultMember)
   >0)
  AND
--condition 3 - current issue type one of not-converted
  (
   [Measures].[Issue type] = "Technical Epic"
    OR
   [Measures].[Issue type] = "Technical Story"
  )
  AND
--condition 4 - is currently in the Closed status
   ([Measures].[Issue status] = "Closed")
  AND
--condition 5 - linked to Time dimension by closure date
--also filters for other context - other dimensions
   [Measures].[Issues closed]>0
  )
))

When multiple dates are used to identify the issues - it is important to clearly define the relationship of each used date field to the report context to create a proper calculation.

Once the primary expression returns the proper result - you might look for further performance improvements by re-arranging or nesting the conditions and reducing the dataset subjected to the conditions.

Regards,
Oskars / support@eazyBI.com

Hi,

Many thanks for your support - I managed to create a calculated measure based on your input and some performance improvements based on steering on another recent topic.

For completeness, this is how the calculation is implemented at the moment:

NonZero(Avg(
  Filter(
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    -- issue created in period
    DateInPeriod(
      [Issue].CurrentMember.get('Created at'),
        [Time].CurrentHierarchyMember)
    AND
     DateBetween(
        [Measures].[Issue created date],
        '13 Oct 2022',
        'today')
    ),
  CASE WHEN
    -- checks if issue went to In handover status
    ([Measures].[Transitions to status issues count],
    [Transition Status].[Ready for Handover],
    [Time].CurrentHierarchy.DefaultMember)>0
  THEN
  -- combine issue type filter and the value
  Aggregate(
    {[Issue Type].[Technical Epic],
    [Issue Type].[Technical Story]},
    ([Measures].[CSA Total Idle and Progress],
    [Time].CurrentHierarchy.DefaultMember)
  )
  END
))