Get the total users executed XRay tests per day to find execution productivity

Hi,

I am trying to create a KPI measure for Xray Test Execution productivity, which has to be from a formula like number of tests executed per user per day. For this, i could count of users as below,

I used Calculated measure,

NonZero(Count(
  Filter(
    DescendantsSet([Xray Test Executed by].CurrentMember,[Xray Test Executed by].[User]),
    --related to time dimension by issue resolution date
    
     [Measures].[Xray Tests executed] > 0 AND
     [Xray Test Run Status].CurrentMember.Name = 'PASS'

)))

and similar one for FAIL TCs. But i am not able to get a total of PASS and FAIL to have unique user names across. Also, from this total value i have to divide Xray tests executed as per Time dimension like per day. I am not getting how to get the total number of users across Pass and Fail (only these two), and divide it by total xray tests.
I am looking for something like this as a result.

|Time|Number of Users|Number of Tests Executed|Productivity||
|Mar-23|5|21|3.75| <–Average of below two per day values
|15-Mar|5|10|2|
|16-Mar|2|11|5.5|

Hi @DarshanK,

You have the right idea of building calculated measures to count users that executed tests. Here are a few improvements you might want to make.

  1. Update calculations for “Number of Users Pass/Fail Tests” and use a tuple to check on test run results. The expression for “Number of Users Pass Tests” might look like this.

    NonZero(Count(
      Filter(
        DescendantsSet([Xray Test Executed by].CurrentMember,[Xray Test Executed by].[User]),
        --has completed tests as PASS
        ([Measures].[Xray Tests executed],
        [Xray Test Run Status].[PASS])  > 0
    )))
    
  2. To get a count of unique users for several execution statuses, you might want to update filter criteria and specify that the user completed at least one test as PASS or as FAIL. Again, use a tuple expression to check each test run status.

    NonZero(Count(
      Filter(
        DescendantsSet([Xray Test Executed by].CurrentMember,[Xray Test Executed by].[User]),
         ( 
          --at least one test is PASS
          ([Measures].[Xray Tests executed],
          [Xray Test Run Status].[PASS]) 
          + 
          --or at least one test is FAIL
          ([Measures].[Xray Tests executed],
          [Xray Test Run Status].[PASS]) 
        ) > 0
    )))
    
  3. Now, you can get the average number of PASS and FAIL tests per user daily. Advance the calculation even further like this:

    --total of PASS and FAIL tests per day
    ([Measures].[Xray Tests executed],
    [Xray Test Run Status].[PASS]) 
    + 
    ([Measures].[Xray Tests executed],
    [Xray Test Run Status].[PASS]) 
    --divided by user count
    /
    NonZero(Count(
      Filter(
        DescendantsSet([Xray Test Executed by].CurrentMember,[Xray Test Executed by].[User]),
         ( 
          --at least one test is PASS
          ([Measures].[Xray Tests executed],
          [Xray Test Run Status].[PASS]) 
          + 
          --or at least one test is FAIL
          ([Measures].[Xray Tests executed],
          [Xray Test Run Status].[PASS]) 
        ) > 0
    )))
    

All calculations use a tuple of measure “Xray Tests executed” and dimension “Xray Test Run Status” to get the count of tests in a particular status. Please see the documentation for more details on tuples: Tuple.

Best,
Zane / support@eazyBI.com