
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I implement or Include Null values in Set Analysis in Qlik Sense
How can I implement this in Set Analysis?
(cu.result ='' or cu.result = null) and tc.coursetype !=4
I have created a flag for null but can use it simultaneously for result=''
count({<SA Here>} id)
Please Accepts as Solution if it solves your query.
- Tags:
- null
- set analysis
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may use something like this:
sign(len(trim(cu.result))) as NullFlag
and then within the expression:
count({< NullFlag = {0}>} id)
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load null as the value during script execution
NullAsValue result;
Set NullValue = 'NULL';
ABC:
Load
id,
If(id=2,Null(),result) as result,
coursetype;
load * Inline [
id, result,coursetype
1,,12
2,,13
2,,4
1,,4
3,bncv,8
4,lkd,7
3,bnn,4
];
and try the below set analysis/expression
=count({< coursetype-={'4'}, result={'' , 'NULL'}>} id)
or
you can use the below expression directly without declaring null as a value during script execution
=count({<coursetype-={'4'}>}if(result='' or isnull(result),id))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may use something like this:
sign(len(trim(cu.result))) as NullFlag
and then within the expression:
count({< NullFlag = {0}>} id)
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load null as the value during script execution
NullAsValue result;
Set NullValue = 'NULL';
ABC:
Load
id,
If(id=2,Null(),result) as result,
coursetype;
load * Inline [
id, result,coursetype
1,,12
2,,13
2,,4
1,,4
3,bncv,8
4,lkd,7
3,bnn,4
];
and try the below set analysis/expression
=count({< coursetype-={'4'}, result={'' , 'NULL'}>} id)
or
you can use the below expression directly without declaring null as a value during script execution
=count({<coursetype-={'4'}>}if(result='' or isnull(result),id))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, @marcus_sommer @NitinK7 I tried both of your ways and both gave the same results.
Please see to below post if you can help.
How to implement nullif along with the cast and coalesce in QlikSense
Regards❤️
Please Accepts as Solution if it solves your query.
