Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Count excluding null value

Dear all

Kindly advise how to exclude null value in using count function.

Month X Count
Total 49 12.000
Jan 8 1.000
Feb 3 1.000
Mar 7 1.000
Apr 2 1.000
May 4 1.000
Jun 3 1.000
Jul 5 1.000
Aug 2 1.000
Sep 0 1.000
Oct 5 1.000
Nov 5 1.000
Dec 5 1.000

 

Not sure why count is 1 instead of 0 in Sept month since X is null (zero)?.

Thanks, Tracy

Labels (1)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

try this


Count({<X -= {'', null()}>} X) 

 

or

Count({<X -= {' ' }>} X)  

View solution in original post

1 Reply
Chanty4u
MVP
MVP

try this


Count({<X -= {'', null()}>} X) 

 

or

Count({<X -= {' ' }>} X)