Forum Discussion

kmd's avatar
kmd
Contributor
3 years ago

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

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.

  • I came across the below thread which helped me understand why this wasn't functioning properly in my app. FWIW, I believe this is an issue in applications prior to v8.4.

    https://community.onestreamsoftware.com/discussions/Reporting/known-issues-with-version-8-4-pf-21833---member-filters/39736

  • Hello,

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

    • kmd's avatar
      kmd
      Contributor

      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's avatar
    EricOsmanski
    Valued Contributor

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

    • kmd's avatar
      kmd
      Contributor

      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's avatar
        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.

  • ASides's avatar
    ASides
    New Contributor II

    I came across the below thread which helped me understand why this wasn't functioning properly in my app. FWIW, I believe this is an issue in applications prior to v8.4.

    https://community.onestreamsoftware.com/discussions/Reporting/known-issues-with-version-8-4-pf-21833---member-filters/39736

    • kmd's avatar
      kmd
      Contributor

      Thank you so much for this.  Very helpful.  We are in the process of migrating to v8.4 so hopefully this feature becomes more usable.