Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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)