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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Null value in set analysis

I would like to know the sales values when Top BU is null. I tried the below expression but it is not working.

sum({<[Top BU]={"$(=IsNull([Top BU]))"}>}Sales).

I would like to have your suggestions to correct my expression.

13 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think Anil's answer is correct. Note the "-" after $.  See also

NULL handling in QlikView

-Rob

Anonymous
Not applicable
Author

Try this

sum({<[Top BU] ={'=$(=len([Top BU])=0)'}>}Sales)

Anonymous
Not applicable
Author

I think suggestions from AMnish Kachhia, rgv rand , Anil Babu should be worked.

But they did not work for me, not sure maybe because of the model I have.

Good article to know about the 'NULL'.

NULL handling in QlikView

However, I solved my problem by adding the below calculated dimension without changing anything in the expression.

if(IsNull([Top BU]),'Yes'), and checked the option "Suppress when value is NULL"

Gaël
Contributor III
Contributor III

I hope this follow-up will be useful for other readers.

Having a similar problem, I noticed that
the complement to Sum({$<[Top BU] {"*"}, ...>}Sales)
is not Sum({$<[Top BU] -= {"*"}, ...>}Sales) as I have read in this forum somewhere.

Your solution is Sum({$-<[Top BU] ={"*"}>}Sales). This already helped me. Thanks! Alternatively, the less elegant expression
Sum({$<ID=E({<[Top BU]={"*"}>} ID), ...>} Sales) works as well.

To combine this with my extra conditions, I wrote Sum({$<...>-<[Top BU] ={"*"}>}Sales).