Hi, I'm having trouble to filter a Customer Set by the date of his first buy(First Activity).

I've tried this two ways:

  1. Returns all customers, even with FirstActivity Null

    SELECT {
    [Measures].[Valor Item],
    [Measures].[First Activity]
    } ON 0,
    {
    Filter(
    { [CLIENTE].[Cliente].[Cliente].Members },
    ( [Measures].[First Activity], [Time].[Year].&[2012-01-01T00:00:00] ).Count > 2
    )
    } ON 1
    FROM
    [SCA]

  2. Return customers that FirstActivity is not null but is outside the Year specified(In this case 2012).

    SELECT {
    [Measures].[Valor Item],
    [Measures].[First Activity]
    } ON 0,
    {
    NonEmpty(
    { [CLIENTE].[Cliente].[Cliente].Members },
    ( [Measures].[First Activity], [Time].[Year].&[2012-01-01T00:00:00] )
    )
    } ON 1
    FROM
    [SCA]

Any help is appreciated.
Thanks.

Re: MDX Filter Set By Date 80 80

Solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.