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: 
Not applicable

Can i write an expression which will not count Blanks in database?

I am trying to count Project ID taking customers as dimension, but it is always showing 1 count extra for every customer. In my SQL database there are blank (no entry )in ProjectID Column for few customers. It is consolidating and considering all blank as 1. Thus i am getting an extra count for every customer. Can I write an expression which can count project ID by Ignoring Blanks.

I tried writing below given Expression:

count(distinct if(not isnull(ProjectID), ProjectID))

but it is not working

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Assuming, you are trying this expression in qv UI. Try:

=count(distinct if( Len(Trim(ProjectID))>0, ProjectID))

View solution in original post

2 Replies
tresesco
MVP
MVP

Assuming, you are trying this expression in qv UI. Try:

=count(distinct if( Len(Trim(ProjectID))>0, ProjectID))

Not applicable
Author

thanks treseco

it worked