1 Reply Latest reply: Jul 7, 2016 7:41 AM by Manish Kachhia RSS

    Counting distinct with more than one argument/condition

      I have a datafile like this.




      If I like to count how many unique customers I have in 2014 it would be something like:


      count({<[Year]={'2014'}>}distinct IdKey


      returning the value: 5


      But how do I count how many unique NEW customers has I gained in 2015? The answer is only one (Idkey 1 and 4 where also customers in 2014 so only IdKey 7 is new).


      I thought it would be something like:

      count({<[Year]={'2015'}, [Year]-={'2014'}>} distinct IdKey

      but it doesn't seems to do the trick.