Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    52

    Question Unanswered: Filter a measure with MDX

    HI all friends


    I have a Fact table like this



    DIMENSSIONS MEASURES
    --------------- ---------------
    idemp idprodcut sales salesws




    I just want make the next query with MDX


    SELECT sales
    FROM myFactTable
    WHERE salesws > 0


    Note that salesws is a measure not a dimmension


    How it would be in MDX? I need a lot of help


    Regards!

  2. #2
    Join Date
    Jul 2010
    Posts
    2
    SELECT
    {[Measures].Sales}
    NON EMPTY {FILTER ([Employee].Members, (Measures.SalesWS > 0))}
    FROM
    Cube

    Assuming Employee is one of your dimensions. The trouble of doing without a dimension is that it aggregate SalesWS as well, as you will get sum of all sales.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    As this post/question is roughly 45 months old, I'd be surprised if you get a response.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    Jul 2010
    Posts
    2
    I unfortunately looked at the date of the original posting after I replied.

    Oh well, as they say better late than never... .

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    There you go!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •