Skip to main content
November 1, 2024
Solved

CubeView rows: Remove member from Tree

  • November 1, 2024
  • 2 replies
  • 0 views

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


AndreaF_0-1730472416693.png

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


AndreaF_2-1730472613566.png

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

 

Best answer by T_Kress

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.

2 replies

T_KressAnswer
November 1, 2024

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.

November 4, 2024

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

U5#MemberName.TreeDescendantsInclusive.Remove(None)

AndreaFAuthor
November 4, 2024

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