Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
abhi1693r
New Contributor II

COUNT A FIELD BASED ON NULLS in another field

Hello,
I had a similar issue. So I have two columns, PART AND CUBES, with one to many relationship.(one PART can have many CUBES or a PART can have no CUBE).
Scenario: If I select 3 PARTS which have 2 CUBES, wherein 2 PARTS have 2 CUBES and 1 PART has no CUBE. I want a count of all the CUBES plus any PART which has no CUBES.

PARTCUBES
SW10011415TV
DC10031323GT
BW1002 

 

@ToniKautto 

So the count should be 2+1=3.
How can I implement this?

Regards,
Abhishek

1 Solution

Accepted Solutions
dwforest
Valued Contributor

Re: COUNT A FIELD BASED ON NULLS in another field

Count(CUBES) + Count({<PART={"=IsNull(CUBES)"}>}PART)

1 Reply
dwforest
Valued Contributor

Re: COUNT A FIELD BASED ON NULLS in another field

Count(CUBES) + Count({<PART={"=IsNull(CUBES)"}>}PART)