Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
soniasweety
Valued Contributor III

Null as Seperate Bar

hi all,

Tresesco B

I want to display null count in one bar and without null count in other bar

how can I achieve this?

can any one help on this?

attached sample qvf ,sheet1 [Req tab]

Tags (4)
8 Replies
MVP
MVP

Re: Null as Seperate Bar

Null in which field? How many expected null values in that field?

soniasweety
Valued Contributor III

Re: Null as Seperate Bar

SF_AccountID

I am not using dimension.

soniasweety
Valued Contributor III

Re: Null as Seperate Bar

what ever the field if I want to show

how can I achieve this? what are the steps to achieve?

MVP
MVP

Re: Null as Seperate Bar

There is a function called NullCount() that you can use. However, this function only counts real nulls and no values like blanks/spaces/invisible characters that might appear as nulls. To consider those values you might try expression like:


=Count( If( len(Trim(Field))=0, Field))

To count without nulls try like:

=Count({<Field={'*'}>} Field)                      // Excludes proper nulls only

=Count( If( len(Trim(Field))>0, Field))       // Excludes even null-like values

devarasu07
Honored Contributor II

Re: Null as Seperate Bar

Hi,

you can try like this. but i dont see any null value in "SF_ACCOUNT_ID" field. check your side


Null Bar

Count(distinct {$<SF_ACCOUNT_ID={"=(Len(SF_ACCOUNT_ID)<=0)"}>} SF_ACCOUNT_ID)

Non null bar

Count(distinct {$<SF_ACCOUNT_ID={"=Len(SF_ACCOUNT_ID) >0"}>} SF_ACCOUNT_ID)

mdmukramali
Valued Contributor III

Re: Null as Seperate Bar

Hi Sony,

You can follow Tresesco B Method .

but in your data filed SF_AccountID no null values are available  (-999 value do you want to consider as Null)


PFA.


Thanks,

Mukram.

soniasweety
Valued Contributor III

Re: Null as Seperate Bar

if I have null values in data ,,it will work?

which u have attached formulae?

devarasu07
Honored Contributor II

Re: Null as Seperate Bar

Hi,

Yeah, if you have null value then the given expression should work. tks