Filter out a dimension member?

  • I'm trying to write an mdx query that can pull data related to members of a specific dimension, (e.g., Products), but want to exclude a product dimension member from the results.

    So, if a Products dimension has 25 members, but I want to exclude one of the products so that 24 product members are returned in the result set, how can this be written in an mdx query?

    I'm stumped! (And, I'm a newbie...)  Any help that is offered is greatly appreciated.

    Thanks,

    Pete

  • First of all, get MDX Solutions by George Spofford.  Great reference when working with MDX.

    Use the Filter function to return the filtered set.  For example:

    Filter([Products].members, [Product].currentmember.name = "Do Not Display")

    HTH

    Steve Hughes, Magenic Technologies

  • Steve:

    Thanks for the reply. I actually figured it out on my own. My problem was with syntax. (I have Spofford's book, but his examples for Filter were data bound without examples that referenced filtering based on object properties like name.) Agreed that the book is an excellent reference.

    Again, thanks for the reply. It confirms that I'm on the right track.

    Pete

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply