Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
2 months ago

CubeView rows: Remove member from Tree

Hi all,

I have a simple cube view where on the row I have Tree expansions, like the following one:

UD5#MemberName.Tree

The reason I am using Tree instead of TreeDescendantsInclusive or others is because I want the rows to collapse on opening  and RowExpansionMode=CollapseAll only works with Tree for the first dimension of the row as far as I now.

Now, the issue is that I would like to remove a member from the rows and the Remove does not seem to work on Tree, while it works on TreeDescendantsInclusive and others.

U5#MemberName.Tree.Remove(U5#None) returns this (expansion enabled=yes, none removed=no):

U5#MemberName.TreeDescendantsInclusive.Remove(U5#None) returns this (expansion enabled=no, none removed=yes):

Is there a way for me to have both the ability to expand/collapse the rows and remove members from the hierarchy, or it is just a trade-off with the impossibility of having both at the same time?

 

Thank you

 

  • I do not believe so.

    A work around may be to conditionally format the row with transparent text when the Member Name = 'None'.  Then it would not appear in the list but appear instead as a blank row.  You would also make the conditionally formatting a super small font row so the row is very tiny, and appears blank.

    Something like this:

    If (RowE1MemberName = 'None') Then
         TextColor = Transparent,FontSize=6
    End If

    Just an idea.

    But you are correct in that I do not believe .Remove works with .Tree and collapse all.

  • T_Kress's avatar
    T_Kress
    Contributor III

    I do not believe so.

    A work around may be to conditionally format the row with transparent text when the Member Name = 'None'.  Then it would not appear in the list but appear instead as a blank row.  You would also make the conditionally formatting a super small font row so the row is very tiny, and appears blank.

    Something like this:

    If (RowE1MemberName = 'None') Then
         TextColor = Transparent,FontSize=6
    End If

    Just an idea.

    But you are correct in that I do not believe .Remove works with .Tree and collapse all.

  • MarcusH's avatar
    MarcusH
    Contributor III

    You have a syntax error. Remove U5# from the None member and that should work ie

    U5#MemberName.TreeDescendantsInclusive.Remove(None)

    • AndreaF's avatar
      AndreaF
      Contributor III

      Hi MarcusH , the 2 expressions - U5#MemberName.TreeDescendantsInclusive.Remove(U5#None) and U5#MemberName.TreeDescendantsInclusive.Remove(None) - are equivalent, they both return the hierarchy with the None removed (I have just tested that just to be sure).