Create a column where if the subtask meets certain conditions add me 1

Hi community,

I bring you a query,

I want to create a column in which I can count all those issues (Parent) that have subtasks, but these subtasks (Although it is one of the subtasks associated with each parent issue) must meet certain conditions.

Ex:I have two issues PARENTS

Father-1
Subtask-1
Fields
A = A.1
B = B.1

   Subtask-2
               Fields
                     A = A.1
                     B = B.2

Father-2
Subtask-1
Fields
A = A.1
B = B.1

In the example I try to explain to you, I have two parent issues and the first one has two subtasks and the other has only one subtask,

Well, my idea is that in a column in EazyBI I can count if a parent issue has even one of its subtasks that meets the condition that fields A and B have the following value.

A = A.1
B = B.1

If we look, in the column I would have to appear a 1 for both cases FATHER-1 and FATHER-1 since both have a subtask that meets this condition.

If it had as a condition that the children have the following values

A = A.1
B = B.2

A single 1 should appear in the column in the row corresponding to FATHER-2

I hope I have been clear enough and can help me,
Best regards.

You would like to access each individual parent issue and validate if an issue has sub-tasks with a particular critreia. Both formulas should be defined with the same pattern. Here is one example, you can reuse it to define both formulas:

Sum(
  Filter(
    Descendants([Issue].CurrentMember,[Issue].[Issue]),
-- check if an issue has sub-tasks
    iif( 
    NOT IsEmpty([Measures].[Issue sub-task keys]),
-- access those sub-tasks to check if there is at least one sub-task with particular criteria
    count(
      Filter([Issue].[Issue].GetMembersByKeys([Measures].[Issue sub-task keys]),
-- criteria for sub-tasks
      [Measures].[Issue A] = "A.1"
      AND
      [Measures].[Issue B] = "B.1")),
     0) >0), 
-- issue have sub-tasks with those criteria, count issue in
    [Measures].[Issues created]
  )

Please check and ad the exact custom field names instead of A abd B. Fill in those field names with autocomplete. Please set the correct filter values instead of A.1 and B.1 as well. They should match case sensitive.

Daina / support@eazybi.com