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: 
Not applicable

Count is twice of total rows of data

I'm pretty new to qlikview and I was using count() function to count the number of total rows that matched specific criteria. When I tried linking two tables and used the function to count one of the linked fields, the total number is twice of how many total data points are in that field. Is this supposed to happen/can I change it. Also, the total count in the statistics box is displayed as n/a.

Any help is appreciated, thanks!

1 Solution

Accepted Solutions
mjm
Employee
Employee

Hello Stephen,

it may be an issue with the data-model, but I believe DISTINCT can help. This can be used like in the example below:

count(DISTINCT field_name)

Does this show any better results?

Please mark as helpful if this helps.

Thanks

View solution in original post

4 Replies
Nicole-Smith

That means there is something wrong with your link.  Can you post your load script and a sample app?

mjm
Employee
Employee

Hello Stephen,

it may be an issue with the data-model, but I believe DISTINCT can help. This can be used like in the example below:

count(DISTINCT field_name)

Does this show any better results?

Please mark as helpful if this helps.

Thanks

Nicole-Smith

Doing the count distinct may make the calculation right, but it isn't going to fix the problem of the bad link in the script...

Not applicable
Author

For proprietary reasons I can't post the script, but for my purposes, DISTINCT fixed the problem. Thank you for all your help!