Any possibility to filter this MDX within an additional custom field


We use Jira and Xray, we had a report where we use the MDX measure below, applied on a test plan level to get the latest execution only from Xray test executions (not repeated tests count).

The MDX measure works well, the only problem is when the test plan had many tests executions inside, then the report crashs and shows an error after a while.

Notice that we are filtering the report with a Jira custom field, that’s why we prefer using this MDX instead of the “Xray test plan overall execution” property that doesn’t filter.

I am thinking of filtering within the custom field from the MDX itself instead of adding it to the report rows, would it be possible that you provide some hints in the code below to get this filter done, or if any other suggestions instead please for this situation?

Thank you in advance!

-- annotations. Group=Xray User defined
  [Xray Test Run Status].CurrentMember.Level.Name = "Status"
THEN --count tests by last execution status
      --iterate throug all Tests
      Descendants([Xray Test].CurrentMember, [Xray Test].[Test]),
      [Measures].[Xray Tests with executions] > 0 AND
        --iterate through execution statuses for a selected Test
        Filter([Xray Test Run Status].[Status].Members,
          [Measures].[Xray Tests with executions] > 0),
        --order statuses by execution date descending
              --iterate through all dates when a Test was executed
                [Measures].[Xray Tests with executions] > 0
            Format([Time].CurrentHierarchyMember.StartDate, 'yyyy-mm-dd'),
        --name of the last execution matches status in columns
      ).item(0) IS [Xray Test Run Status].CurrentMember)
ELSE --total count of tests with executions
  ([Measures].[Xray Tests with executions],
  [Xray Test Run Status].DefaultMember)

Related: Xray Test plan execution status - Questions & Answers - eazyBI Community


This is a gentle reminder regarding this question, any help will be really appreciated.

Thank you,

This issue is resolved, it is not due to the MDX calculation mentioned above but instead it is because of another selected dimension for status execution, once that dimension is removed or replaced that would no longer be any performance issue.

1 Like

Problem back to “unresolved”, unfortunately, I noticed an issue with the statics in the new reports when I used the “TestRunStatus” dimension instead of the “Xray Test Run Status” dimension. The “TestRunStatus” doesn’t give the last run only instead it gives the cumulative execution of a test. Can I filter the MDX with status execution instead?