Has anyone successfully used HasChildren=True/False in a cube view member filter?

kmd
Contributor

I'm building a cube view where I want to pull, in tree view, all descendants of a particular hierarchy but I also want to apply 2 where clauses:  Where the member is either a 'parent' OR where the member's description begins with certain letters.

So my MF looks like this:  U4#MyHierarchy.TreeDescendantsInclusive.Where((HasChildren=True) or (Description Startswith FS)).

To step back though, at this point, I can't even get the first part of that syntax to work on its own.  I keep getting unexpected text "HasChildren.....".  Doesn't seem to matter how I write this (with or without the 'where') per the OS documentation.

I'm just wondering if anyone has successfully used this and perhaps provide a working example so I can figure out what I'm doing wrong here.

Thanks in advance for any guidance.

6 REPLIES 6

NidhiMangtani
Contributor III

Hello,

Please write a XFBR rule to pull through the required entity members.

Thanks,
Nidhi Mangtani

Thank you. However I am trying to pull in members of a user defined dimension and am really just wondering whether, via a member filter only (and outside of having to write an XFBR for this), the HasChildren where() clause which is part of the member filter options, actually works against anything other than the Entity dimension.

EricOsmanski
Valued Contributor

This works: A#[Income Statement].TreeDescendantsInclusive.Where(HasChildren = True). Try spaces before and after the equal sign.

Thanks Eric.  It seems like I can get this working as well for any of the Standard dimensions but not from a UD dimension.  Are you able to make this same MF work with a user defined dimension?  I'm curious.

EricOsmanski
Valued Contributor

Yea, it works as long as you have spaces before and after the equal sign. If you don't, you get the error message you are seeing.

OK thanks for this.  I must be doing something wrong because I sure can't get it to work with my Alternate UD4 hierarchy.  At least I know it should work.  Thanks again.