Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set with Null values

Hi,

I've a "Maintenances" table with 2 fields: FailureType and MaintenacesCount.
I wuold like to count all the maintenances where FailureType is null.
I'm using the expression below, which works correctly:

sum(MaintenancesCount) - sum({<FailureType={*}>}MaintenancesCount)

As you see, I get what I need subtracting 2 sets.
Is there a way to describe a set of null values? Something like this (which doesnt work)

sum({<FailureType={null}>}MaintenanceCount)

Regards,
Corrado

1 Reply
Not applicable
Author

You can replace NULL value by the string value - "NULLFailureType"


LOAD
....
if(isNull(FailureType, 'NULLFailureType', FailureType)) as FailureType
....


After that you can use your expression:


sum({<FailureType={"NULLFailureType"}>}MaintenanceCount)