Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use isnull() in Set Analysis?

I want to use "sum(if(isnull(Department)=0,Sales))", but how can I achieve by useing Set Analysis?

5 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You check the null condition in script. This will make the expression easy at reporting level.

If(isnull(Fieldname) =-1,'Y','N') as Indicator

at expr:

sum({<Indicator ={"Y"}>} Amount)

Anonymous
Not applicable
Author

Thank you Deepak Kurup, but how can you achieve it without creating a new field "Indicator"?

sparur
Specialist II
Specialist II

Hello, John

try this:

sum({$<[Department]={"=Len(Department) = 0"}>} Sales)

or

sum({$<[Department]={""}>} Sales)

sorry, for you task it will be like this:

sum({$<[Department]={"=Len(Department) > 0"}>} Sales)

Anonymous
Not applicable
Author

Thank you, sqarur.

Not applicable
Author

I think the Len function only works when your value is not really a null, but an empty string.

The difference is subtle,  but there IS a difference.