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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - NULL Values

Hi,

is it possible to use set - expressions to query for null values?

For example, I would like to express the following formula:

sum ( if (isnull(OrderNumber), Flag)

Thanks,

Gerald

1 Solution

Accepted Solutions
yblake
Partner - Creator II
Partner - Creator II

Hello,

I think you need to calculate sum of all flag minus flags with orders :

sum({1-<OrderNumber>=0>} Flag)

or sum(Flag) -sum({<OrderNumber>=0>} Flag)

It returns 3 (10-7) with this script :

test:
load
recno() as Key,
if (mod(recno(),3)=0,null(),recno()) as OrderNumber,
1 as Flag
autogenerate(10);

View solution in original post

3 Replies
johnw
Champion III
Champion III

I believe it's as simple as this:

sum({<OrderNumber={}>} Flag)

That should give you the set of all selected records that are not associated with OrderNumber, which I think is the same as saying you want all selected records where the OrderNumber is null.

yblake
Partner - Creator II
Partner - Creator II

Hello,

I think you need to calculate sum of all flag minus flags with orders :

sum({1-<OrderNumber>=0>} Flag)

or sum(Flag) -sum({<OrderNumber>=0>} Flag)

It returns 3 (10-7) with this script :

test:
load
recno() as Key,
if (mod(recno(),3)=0,null(),recno()) as OrderNumber,
1 as Flag
autogenerate(10);

Not applicable
Author

Thanks Smile