Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Counting distinct with more than one argument/condition

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

1 Reply

Re: Counting distinct with more than one argument/condition

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

Community Browser