MDX How handle in WHERE > X

  • Hi!

    I have a MDX where I need to exclude some Product Ids from the results. A simplified version of my MDX looks like this:

    SELECT NON EMPTY

    [Measures].[Income]ON COLUMNS,

    NON EMPTY

    [Company].[Company].Children *

    ([Customer].[District].Children,

    [Customer].[CustomerNo].Children,

    [Customer].[Customer].Children,

    [Customer].[City].Children)

    FROM [Cube]

    WHERE ([Product].[Product Id] > 1000)

    The problem is that I don't want to add Product Id to my selected dimension due to performance.

    The Product Id is today always numeric but is in a alphanumeric column. I've tried different types of FILTER and EXCEPT, but havn't got it right.

    Also, in the original MDX there are a lot of WITH MEMBER... Measures...

    Any ideas?

  • I solved it!

    SELECT NON EMPTY

    [Measures].[Income]ON COLUMNS,

    NON EMPTY

    [Company].[Company].Children *

    ([Customer].[District].Children,

    [Customer].[CustomerNo].Children,

    [Customer].[Customer].Children,

    [Customer].[City].Children) ON ROWS

    FROM [Cube]

    WHERE ({Filter({[Product].[Product Id].Children}, (StrToValue([Product].[Product Id].CurrentMember.Properties("Name")) > 1000))})

    🙂

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

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