Pie Chart of Associated Test Cases based on Test Plans created date (month)

I’d like to create a pie chart that represents all test cases, based on execution status, associated to Test Plans created in a specific month. The driving force behind the report is the month the Test Plan was created in. When the test case or test execution was created is irrelevant for this report. Would like to simply see the connection of all test cases for all test Plans created within a specific month.
The closest I’ve gotten is this:


After further research I don’t think TestRunStatus is the measure I want to use (the data is not matching). And this pie chart is providing data based on test case created dates.

I’ve also tried creating a new calculated measure using CASE statement to include the created date for TestRunStatus to be the beginning statement but I get an error “failed to execute query” with no error message (sorry tried to post the code but not allowed as a ‘newbie’ poster)

Any help without judgment is greatly appreciated. Seems so simple but I’ve been at this for days now.
Thanks!

Here is the code I was referring to in the original question:

@CCorona

Try using DateInPeriod in the Cas when validation part.

CASE WHEN
[TestRunStatus].CurrentMember.level.name = "TestRunStatus"
AND
DateInPeriod(
[Xray Test Plan].currentmember.get('Created date'),
[Time].CurrenthierarchyMember
)
THEN...
END

If that didn’t help please reach out to support@eazybi.com and provide your report definition.

Martins / eazyBI

Hi @CCorona,

By default, Test count is grouped by test creation date and Test Run count is grouped by run finished or started date. Each measure is described in the documentation: Xray Test Management.

If you would like to analyze data from the “Test Plan” perspective, you might want to change how the “Time” dimension is related to “Test Plan” dimension and Xray specific measure “Xray Test Runs”. Then you might want to use the suggested solution by @martins.vanags. The key is to use the function DateInPeriod() to link the Test Plan to the selected period in the “Time” dimension.

The logic for calculated measure: go through all Test Plans and check if Test Plan created date is in the selected period. If so, then sum up test runs ignoring the run finish date.

NonZero(Sum(
  --set of test plans created in selected period
  Filter(
    DescendantsSet([Xray Test Plan].CurrentMember, [Xray Test Plan].[Plan]),
    DateInPeriod(
      [Xray Test Plan].CurrentMember.get('Created date')
      [Time].CurrentHierarchyMember) 
  ),
  --sum up all Test Plan runs regardles of executio date
  ([Measures].[Xray Test Runs],
  [Time].CurrentHierarchy.DefaultMember)
))  

This calculated measure would work well with dimension “Xray Test Execution Statuses” to group runs by their execution status.

Best,
Zane / support@eazyBI.com