Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting distinct with more than one argument/condition

I have a datafile like this.

Udklip.JPG

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.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=COUNT({<Year = {2015}, IdKey = E({<Year = {2014}>}IdKey)>}DISTINCT IdKey)

View solution in original post

1 Reply
MK_QSL
MVP
MVP

=COUNT({<Year = {2015}, IdKey = E({<Year = {2014}>}IdKey)>}DISTINCT IdKey)