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: 
gautik92
Specialist III
Specialist III

Count

I have a scenario where some employees have latitude values and some dont have

I want to count the employees who have latitude values and count of employees who dont have

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Count({<latitude={'*'}>} Distinct Employees)      -->Employess with latitude values

Count({$- <latitude ={'*'}>} Distinct Employees)   -->Employess without latitude values

Or,

Count(Distinct Employees) - Count({<latitude={'*'}>} Distinct Employees)

Note: This works If 'no latitude values' means null.

View solution in original post

7 Replies
tresesco
MVP
MVP

Try like:

Count({<latitude={'*'}>} Distinct Employees)      -->Employess with latitude values

Count({$- <latitude ={'*'}>} Distinct Employees)   -->Employess without latitude values

Or,

Count(Distinct Employees) - Count({<latitude={'*'}>} Distinct Employees)

Note: This works If 'no latitude values' means null.

gautik92
Specialist III
Specialist III
Author

Hi tresesco,

without latitude not working

Kushal_Chawda

try

Count({<latitude={"=len(trim(latitude))>0"}>} Distinct Employees)      -->Employess with latitude values

Count({<latitude  ={"=len(trim(latitude))=0"}>} Distinct Employees)   -->Employess without latitude values

tresesco
MVP
MVP

Perhaps they are not really null. Could you attach a sample qvw ?

gautik92
Specialist III
Specialist III
Author

values from database

tresesco
MVP
MVP

Did you try like:      Count({$- <latitude ={'*'}>} Distinct Employees)

gautik92
Specialist III
Specialist III
Author

got it thanks