Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist II
Specialist II

Set Analysis - Counting Null Values

Hi,

I need to count how many  meters I have when my field CONSUMO_MADRUGADA is null.

I tried:

Count({<CONSUMO_MADRUGADA-={"''"}>} DISTINCT OID_METER )

Count( {<CONSUMO_MADRUGADA={"=Len(CONSUMO_MADRUGADA)=0 "}>}DISTINCT OID_METER)

Count({<CONSUMO_MADRUGADA=-{}>} DISTINCT OID_METER)

with no sucess.

Any idea?

Labels (1)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

try below

Count({1-$<CONSUMO_MADRUGADA={"*"}>} DISTINCT OID_METER )

View solution in original post

4 Replies
Highlighted
MVP
MVP

try below

Count({1-$<CONSUMO_MADRUGADA={"*"}>} DISTINCT OID_METER )

View solution in original post

Highlighted
Specialist II
Specialist II

Hi Kush, that works  for me.

Could you please explain this line code?

I don't know if  I understand, first you select every  CONSUMO_MADRUGADA that's not null ( $<CONSUMO_MADRUGADA={"*"}>) and then subtract of the total? 

Highlighted
Creator
Creator

Try this:

 

IF(IsNull(CONSUMO_MADRUGADA)=-1 , Count(DISTINCT OID_METER))

Highlighted
MVP
MVP

@eduardo_dimperio  CONSUMO_MADRUGADA={"*"} will help to find first all the instances of  CONSUMO_MADRUGADA which are not null.  Then set identifier 1-$ help to find the null values by subtracting not null values from entire data set