Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
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
Highlighted
MVP
MVP

Re: Counting distinct with more than one argument/condition

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

View solution in original post

1 Reply
Highlighted
MVP
MVP

Re: Counting distinct with more than one argument/condition

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

View solution in original post