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

Is it possible that YearMonth and EmployeeID are coming from different tables?

marley1978
Contributor III
Contributor III
Author

Same table. 

sunny_talwar

Did you try this?

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

marley1978
Contributor III
Contributor III
Author

I tried that before I posted and yes that works but why would it do this.

Doesn't make sense

OmarBenSalem

My bad !

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

sunny_talwar

I agree... but I don't really have a view into what you are seeing... so difficult to comment...

marley1978
Contributor III
Contributor III
Author

Right,  there are instance where I want to group by other dimensions,  that is why I kept it generic.  Thanks for the help today

marley1978
Contributor III
Contributor III
Author

For some reason that does not even give me a value.

OmarBenSalem

Can u please share a sample app?

marley1978
Contributor III
Contributor III
Author

Unfortunately I can't since this is real data.