Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
malradi88
Creator II
Creator II

Removing a blank Blank Value Count Function

Dear Qlik Community,

I hope this finds you well. I have the following formula that works fine for counting the specified subfield (# of schools)

Count (Distinct (subfield (key,'+', 2)))


However there is one blank value that is being counted in this KPI  (I confimed in the excel sheet that one cell does not have a school name) so instead of 48 schools it is counting 49. How can I get rid of this blank value?


Thank you in advance for your support


Best,


Mohammed

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Or this

Count(DISTINCT If(Len(Trim(SubField(key, '+', 2))) > 0, key))

View solution in original post

3 Replies
pradosh_thakur
Master II
Master II

Count (Distinct (subfield (if(len(trim(key))>0,key),'+', 2)))



Learning never stops.
sunny_talwar
MVP
MVP

Or this

Count(DISTINCT If(Len(Trim(SubField(key, '+', 2))) > 0, key))

malradi88
Creator II
Creator II
Author

Thank you all for your help Much appreciated