Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
sculptorlv
Creator III
Creator III

Count unique values only

Hello, I guess my question is very easy, still can't find solution..

I have table:

 

ClassNr2.
LIRIKAK000545
LIRIKAK000545
LIRIKAK000545
LIRIKAK000650
LIRIKAK000703
LIRIKAK000168
LIRIKAK000551

I need to get count of all unique Nr2 for each class.

I use Count(nr2) and get sum of all rows - the result is 7

But I need only count unique Nr2 .. and the result must be 5. How can I modify my COUNT?

ClassNr2.
LIRIKAK000545
LIRIKAK000650
LIRIKAK000703
LIRIKAK000168
LIRIKAK000551
1 Solution

Accepted Solutions
mark6505
Partner
Partner

Hi

Try

Count(Distinct nr2)


Mark

View solution in original post

5 Replies
mark6505
Partner
Partner

Hi

Try

Count(Distinct nr2)


Mark

View solution in original post

sunny_talwar

May be one of these:

Count(DISTINCT nr2)

or

Count(Aggr(Count(Distinct nr2), Class))

Chanty4u
Champion III
Champion III

use rownum() 

or

count(distinct urfield)

rgvavihs
Specialist
Specialist

Count(Distinct Nr2.)

sculptorlv
Creator III
Creator III
Author

Thanks to all of you!