Total of Descendants in Collapsed/Expanded view

Hi,
let me descride a a data for question:

  1. I have a sturcture of linked Members

In table Collapsed view it looks like this:
image

In table Expanded view it looks like this:
image

Next,

I’ve added Calculated measure “leaf_todo”, which finds issues with “Issue type: CTE + Status Category: Yo Do” and draws “1” if it’s true
In Total there’s right sum : 3 issues
image

Next,
I’ve added Calculated measure Count_in_root_ToDo which draws the Sum of all “leaf_todo” in root of structure row.
image

We can see that the Sum is right , there’re (2+1) issues
but it’s not drawn it Total row…
In collapsed view Total works good
image

My question is how to draw Total for that Calculaded measure column in expanded view?
image

*in first comment I’ve added code for used elements

Code for MembersHierarchy in Settings

[jira.customfield_init]
name = "INIT"
inward_link = "is contained in"
issue_type = "Initiative"
update_from_issue_key = "customfield_change"
dimension = true

[jira.customfield_change]
name = "CHANGE"
inward_link = "is contained in"
issue_type = "Change"
update_from_issue_key = "customfield_cte"
dimension = true

[jira.customfield_cte]
name = "CTE"
inward_link = "is contained in"
issue_type = "CTE"
update_from_issue_key = "epic_key"
dimension = true

Code for “leaf1_ToDo”

CASE
WHEN

IIf(

        IsEmpty(ExtractString([Measures].[Issue type],  'CTE'))
        ,
        0,
        iif(

                IsEmpty(ExtractString([Measures].[status_category],  'To Do'))

                ,
                CBool(0),
                CBool(1)
        )
)
THEN 1
END

Code for Count_in_root_ToDo

NonZero(
        Count(
                Filter(
                        Descendants([Issue].CurrentHierarchyMember.GetLinkedMember('INIT')),


                        IIf(
                                IsEmpty(ExtractString([Measures].[Issue type], 'CTE'))
                                ,
                                0,
                                iif(
                                        IsEmpty(ExtractString([Measures].[status_category], 'To Do'))

                                        ,
                                        CBool(0),
                                        CBool(1)
                                )
                        )
                )
        )
)

There’s an idea from Team:

I’ve tried code below, but nothing changed.

--annotations.total=sum

NonZero(
        Count(
                Filter(
                        Descendants([Issue].CurrentHierarchyMember.GetLinkedMember('INIT')),


                        IIf(
                                IsEmpty(ExtractString([Measures].[Issue type], 'CTE'))
                                ,
                                0,
                                iif(
                                        IsEmpty(ExtractString([Measures].[status_category], 'To Do'))

                                        ,
                                        CBool(0),
                                        CBool(1)
                                )
                        )
                )
        )
)

image

Hi @cybertachikoma,

The total calculation gets confused when expanding the various Issue dimension hierarchy levels. Instead, I recommend filtering the report in the report pages to display only the desired issues with other dimensions. And use the “All” level of the Issue dimension to display the totals.

I recommend replacing the calculation for returning the number of child issues of a specific type and in a particular status category with a tuple. The formula could look similar to the one below:

([Measures].[Issues created],
[Issue Type].[CTE],
[Status.Category].[To Do])

See an example with “Story” type issues in the picture below:

We have a bug regarding the total calculation behavior with the row dimension hierarchy levels in our backlog. I added your vote to it. Unfortunately, I don’t have any estimates. We will update this post once there are any developments.

Best,
Roberts // support@eazybi.com

1 Like

Hi,
your solution works good (both with “Total” or “All”)
image

More than that - It helped me to realize a concept, how to make “SELECT from” in EB.
Now I can add next filters, by labels for example.

(
[Measures].[Issues created],
[Issue Type].[CTE],
[Status.Category].[To Do],
[Label].[label0]
)

Thank you a lot.

1 Like