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

Hi @zane.baranovska ,

in my case I had this first query, taken for from you in issue below:
Xray Test plan execution status - Questions & Answers - eazyBI Community

-- annotations. Group=Xray User defined
CASE WHEN
  [Xray Test Run Status].CurrentMember.Level.Name = "Status"
THEN --count tests by last execution status
  Cache(NonZero(Count(
    Filter(
      --iterate throug all Tests
      Descendants([Xray Test].CurrentMember, [Xray Test].[Test]),
      [Measures].[Xray Tests with executions] > 0 AND
      Order(
        --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
        DateParse(
          Generate(
            Tail(
              --iterate through all dates when a Test was executed
              Filter([Time].[Day].Members,
                [Measures].[Xray Tests with executions] > 0
              )).Item(0),
            Format([Time].CurrentHierarchyMember.StartDate, 'yyyy-mm-dd'),
            ",")),
        BDESC
        --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)
END

And your query from this post:

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
)))

I would like to merge the second query in the first query, and retrieve the PASS count only in the first query, could you please support me on this I struggling on it?

This is needed to split the first measure into six measures (PASS, FAIL, TODO, ABORTED, EXECUTING, BLOCKED) to resolve the time out issue when we use the dimension “Xray Test Run Status” in columns (This dimension is causing a performance problem in the same time I couldn’t find a substitue for it only I found the dimension “TestRunStatus” that doesn’t cause a performance but it gives wrong values for us it gives an increment of the execution not the last execution count only as we need and like the other dimension mentioned before).

Thank you,
Seif