Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Count function

Hello,

I have a group of five products as follows:

A

B

C

D

A

I need a formula that returns the number of different products, so it should return 4 (A, B, C, D). I used "count" but it gives 5 (Ax2, B, C, D).

Could you please help ?

thks,dani

1 Solution

Accepted Solutions
Not applicable

You can use count (Distinct Product).

View solution in original post

10 Replies
Not applicable

You can use count (Distinct Product).

alexandros17
Partner - Champion III
Partner - Champion III

Count( DISTINCT Item)

MK_QSL
MVP
MVP

count(DISTINCT Product)

Not applicable

Count(Distinct Product)

Not applicable

=Count(Distinct Product)

Not applicable

i think your problem is Solved mark this question as Answered

hic
Former Employee
Former Employee

And Count(distinct ...) is not single threaded. This is a myth. See

http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct

HIC

giakoum
Partner - Master II
Partner - Master II

It is not single threaded, if it is on a field in the fact table

but it is, if it is on the dimension table.

have I not understood correctly?

hic
Former Employee
Former Employee

There is a (usually small) phase in the chart evaluation that is single threaded, and that is when the chart "generates the combinations" over which the aggregation should be made. This affects all charts with fields from several tables, as well as those that contain Count(distinct ...). Apart from that, it is multi threaded.

HIC