Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

malradi88
Contributor

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

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Removing a blank Blank Value Count Function

Or this

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

3 Replies
pradosh_thakur
Valued Contributor III

Re: Removing a blank Blank Value Count Function

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



MVP
MVP

Re: Removing a blank Blank Value Count Function

Or this

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

malradi88
Contributor

Re: Removing a blank Blank Value Count Function

Thank you all for your help Much appreciated