Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Issue with Counting Distinct

Hello,

I am trying to count distinct 'Call: Call ID' using set analysis. I have include the script I am using below. However, when I use this method, I am missing about 30 records from the data set. I have confirmed that there should be 241 records returned but I am only getting 210. Is there something wrong with my script? Any other suggestions as I am stuck...

Thanks.

Count(distinct{$<[Liason Type]-={'FME','AML'},[Product: Description]={'Apples'},Objective-={'Presentations'}>} [Call: Call ID])

27 Replies

Re: Issue with Counting Distinct

Would you be able to share a sample to check this out? Expression in itself doesn't look wrong.

Not applicable

Re: Issue with Counting Distinct

Sure. Would you like a sample of the data set?

Not applicable

Re: Issue with Counting Distinct

Sure. Would you like a sample of the data I am using or other?

Re: Issue with Counting Distinct

Qvw or Excel data will work. If you are providing Excel, please let us know the dimensions you have used

MVP
MVP

Re: Issue with Counting Distinct

Do you have NULLs in your fields you are trying to filter?

And you don't have active selections in your model?

Also have a look at

Excluding values in Set Analysis

Not applicable

Re: Issue with Counting Distinct

There may be a few NULLs in the dataset but I am not trying to filter these.

I am trying to build a line graph that shows number of interactions per month over a period of time. I just want the graph and do not need/want selection filters on this particular sheet.

I will check out the link provided.

Thanks.

Re: Issue with Counting Distinct

The attached doesn't have a field called Liason Type, don't know if that is important or not but you have used that in your expression. Without using that, I am getting a distinct count of 503.

Used this expression:

=Count({$<[Product: Description]={'Apples'}, Objective-={'Presentations'}>} DISTINCT [Call: Call ID])

Not applicable

Re: Issue with Counting Distinct

Thanks! Yes, I get this number when just counting in Excel and removing duplicates. This tells me the script is working in this case. However, then I apply the script to my other data set, I still only get 210 records and there should be 238 (I counted manually). This is very strange...

Re: Issue with Counting Distinct

What is that extra part? Can we have that too to check?