How to get fields from different subtasks on eazyBI report

Xavi fernandez February 10, 2017

Hi,

 

 

The idea is:   get fields from Task, and also fields from subtask of type "A" and "B" on the same row.

How can I do it?

 

Example

 

       Key Task | due date Task| status subtask type A | status subtask type B

 

Thanks.

 

1 answer

0 votes
eazyBI Support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2017

Hi Xavi,

Here is an example how to retrieve a string value, in this case, Sub-task status, from the first sub-task with issue type 'Sub-task A'.

Generate(
  Filter(
    [Issue].[Issue].GetmembersByKeys(
      [Issue].CurrentHierarchyMember.get('Sub-task keys')
    ),
     [Measures].[Issue type] = 'Sub-task A') 
  .Item(0),
  Cast( [Measures].[Issue status] as String), ",")

 

The GetmembersByKeys function gets a set of all subtasks of an issue, a Filter filters out the ones with type 'Sub-task A'. Generate function creates a string from this Sub-task status.

Marcelo Cid _Antiguo_ June 13, 2022

can you show how it should look like on eazybi ?

Oskars Laganovskis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2022

Hello Marcelo,

You were looking for a measure that checks if a parent issue is resolved within the current time period - how many of its sub-tasks of a specific type - "Block" are in a specific resolution - "Done".

You needed to keep the default hierarchy in the Issue dimension since you wanted to filter issues by parent task resolution date.
​Since the sub-tasks are built within the sub-task hierarchy and their issue keys are not available as a property of the parent task - the expression needs to switch between hierarchies during the calculation.


​The MDX expression for the calculated measure was as follows.

CASE WHEN
[Measures].[Issues resolved]>0
THEN
NonZero(
 Count(
  Filter(
   DescendantsSet([Issue.Sub-task].[Parent].GetMemberByKey([Issue].CurrentHierarchyMember.Key),
                  [Issue.Sub-task].[Sub-task]),
   [Issue Type].[Issue Type].GetMemberNameByKey([Issue].CurrentHierarchyMember.Get('Issue type ID'))="Block"
   AND
   [Resolution].[Resolution].GetMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = "Done")
 )
)
END


​Regards,
​Oskars / support@eazyBI.com 

Marcelo Cid _Antiguo_ June 28, 2022

Hi @Oskars Laganovskis

 

I try to visualize it this way but it is not possible

 

dsadad.png

Oskars Laganovskis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2022

Hi @Marcelo Cid _Antiguo_ ,

Please select the Issue level on the default hierarchy.

Alternatively, you might sum the values for all issues within the project by creating the following construction.

Sum(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
--the actual calculation for each issue
<the previously provided code>)

 That would return values on the project level.

Suggest an answer

Log in or Sign up to answer