Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

chriscools
Contributor

How to use Null value in set analysis?

Hello,

i'm trying to make an overview of all the SKU's created in our system, but missing a certain field "ProductCollectionCode".

And i'm trying to do it like this:

Count ( { $<[ProductStatus]={'Active'}, ProductCollectionCode = {''}  >}               SkuCode)

But i don't get any results and i'm sure that there are.

I'm also sure that the expression works because i get results  if i do fill in a collection code like this:

Count ( { $<[ProductStatus]={'Active'}, ProductCollectionCode = {'2017 Summer'}  >}               SkuCode)

So it must be that the NULL value is causing the expression not to work.

Any ideas how i might have a workaround in the expression without changing Null values in the script?

(The load scripts are made by an external company, which means it's costly to adapt, it takes time AND i have

a lot of these empty fields in our masterdata that i would like to work with)

Thanx for your help!!

grtz,

Chris

1 Solution

Accepted Solutions
vinieme12
Esteemed Contributor II

Re: How to use Null value in set analysis?

or, this....but ideally create flags in script for better performance.


Count({$<[ProductStatus]={'Active'} >} if(isnull(ProductCollectionCode),SkuCode))

2 Replies

Re: How to use Null value in set analysis?

So you want to Count(SkuCode) where ProductCollectionCode is null? May be this:

Count({$<[ProductStatus]={'Active'}, SkuCode = {"=Len(Trim(ProductCollectionCode)) = 0"}>} SkuCode)

or

Count({$<[ProductStatus]={'Active'}, ProductCollectionCode = e({<ProductCollectionCode = {'*'}>})>} SkuCode)

vinieme12
Esteemed Contributor II

Re: How to use Null value in set analysis?

or, this....but ideally create flags in script for better performance.


Count({$<[ProductStatus]={'Active'} >} if(isnull(ProductCollectionCode),SkuCode))

Community Browser