09-14-2022 08:18 AM - last edited Wednesday by JackLacava
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.
09-14-2022 11:29 AM
Please write a XFBR rule to pull through the required entity members.
09-14-2022 12:01 PM
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.
09-14-2022 12:32 PM
This works: A#[Income Statement].TreeDescendantsInclusive.Where(HasChildren = True). Try spaces before and after the equal sign.
09-14-2022 12:50 PM
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.
09-14-2022 12:57 PM
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.
09-14-2022 02:37 PM
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.