Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
marley1978
Contributor III
Contributor III

Counts Showing Incorrectly in charts

I have a measure where I use an expression of

Count ({< [Term] = {'Yes'}, [Term Reason] -= {'Unknown'}>} EmployeeID)

When I use this in a pivot table and group by YearMonth I get a total of 791 records which is correct.

When I use the same expression in a KPI I get 784 records.  Looks like its removing duplicate employeeIDs.  Duplicate records can occur since an employee can be termed more than once in a given period.

I am not sure what is going on since I am using the same master measure in both types of charts.

Any ideas why it would do this?

21 Replies
sunny_talwar

Are you sure that you are not using DISTINCT in the expression by any chance?

marley1978
Contributor III
Contributor III
Author

I am not.  That is why I am confused.   The expression is exactly as I have in my post.

sunny_talwar

What happens when you use this as a measure directly in the chart rather than using it as a master measure? Does it still behave the same way?

OmarBenSalem

What happens if u use :

if([Term] = {'Yes'} and[Term Reason] <> {'Unknown'},Count ( EmployeeID) )

marley1978
Contributor III
Contributor III
Author

how do I do that?

sunny_talwar

Wherever you are using the master measure, can't you really replace that with the measure itself? I am new to Qlik Sense, so don't really know how it works... but may be omarbensalem‌ might be able to help better on this

marley1978
Contributor III
Contributor III
Author

I copied that and it says there is an error in the expression

')' is expected

marley1978
Contributor III
Contributor III
Author

I added the measure without using the master item and same results

sunny_talwar

One way to resolve this would be to try this

Sum(Aggr(Count ({< [Term] = {'Yes'}, [Term Reason] -= {'Unknown'}>} EmployeeID), YearMonth))

but even it works, that would still not explain why it doesn't work in the first place