Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I found this post here, http://community.qlik.com/message/172382#172382 but its not answering my question, more a workaround.
How do I group null values in set analysis as an expression so I can be certain that all null values are being treated as a set.
I have data that has values which I can group into various sets and then the balance is null and I want to group that as well.
When its not a null value (e.g. the category is M then my code looks like this, and this works fine.
sum({$<wcGroup={M}>}smProd) / sum({$<wcGroup={M}>}qty)
Now when the wcGroup field contents isnt M but its null how can I manage the set?
I tried syntax
sum({$<wcGroup={""}>}smProd) / sum({$<wcGroup={""}>}qty)
sum({$<wcGroup={null}>}smProd) / sum({$<wcGroup={null}>}qty)
sum({$<IsNull(wcGroup)>}smProd) / sum({$<wcGroup={""}>}qty)
and nothing is correct syntax-wise.
Within set analysis how do I manage null values?
Thanks
I haven't tried this myself, but I suspect that if you include the following statements in the script, you could test for a NULL value with normal SET syntax:
NullAsValue "wcGroup";
set NullValue='<NULL>';
HIC