Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why isn't COUNT DISTINCT working properly?

So I have a problem. With every other text box where I put =COUNT({<[Pr Yr] = {2017}, DOINVSTATUSID = {20}, LOADPRIORITYSTATUSID = {30}>} DISTINCT ITMSNumber) it works fine, but there are two text objects where the count distinct function is returning 4 of the same ITMSNumber's. It should only be returning 1 with the same ITMSNumber.

Why is this happening and how can I fix it?

13 Replies
Not applicable
Author

It says "Text Object"

swuehl
MVP
MVP

Well, hard to tell what's going on using the information provided.

There might be multiple things that may affect your distinct count() in different chart objects: Use of set analysis, alternate states, detached objects ...

Clever_Anjos
Employee
Employee

Is ITMSNumber a key? You should avoid counting key fields

sunny_talwar

Distinct counting a key field should not be a problem as mentioned my HIC here Count or Count distinct?

Capture.PNG