Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pascos88
Contributor

Set Analysis with two values, one with null

Hello,

I need to write a set analysis function with two value and one should filter for the value not equals to null..

count({<CampaignID={$(v_This_Year)} , prt_drop =("NULL")  >} DataUpd_Conf)...

something like this..

Any idea ?

Best,

6 Replies
ppeterson1
New Contributor

Re: Set Analysis with two values, one with null

count({< CampaignID = {$(v_This_Year)} , prt_drop -= {'NULL'} >} DataUpd_Conf)

I believe that the above will be the case, if you are looking for when prt_drop is not equal to 'NULL'. This will not account for errors in NULL ie. null, nUll, Null, etc.

Hope this helps,

Paul

YoussefBelloum
Esteemed Contributor

Re: Set Analysis with two values, one with null

Hi,

try this:

=count({<CampaignID={$(v_This_Year)} , prt_drop =("=len(trim(prt_drop ))<>0")  >} DataUpd_Conf)...

MVP
MVP

Re: Set Analysis with two values, one with null

>>and one should filter for the value not equals to null..

Count({<CampaignID = {$(v_This_Year)}, prt_drop ={'*'}>} DataUpd_Conf)

pascos88
Contributor

Re: Set Analysis with two values, one with null

Hi Thanks for the answer, something wrong.

The result give me 0, but should be different.

I should count all the DataUpd_conf where CampaignID = 'v_this_year'  and prt_drop is not null..

This should be the logic.

Can you see something wrong in my set Analysis?

Thanks again

pascos88
Contributor

Re: Set Analysis with two values, one with null

I just relized that I can also have something like this:

=count({<CampaignID={$(v_This_Year)}>} DataUpd_Conf) - count (prt_drop)

and I got the right result..

But it will be nice to see also the other solution, and how use it in the Set Analysis

YoussefBelloum
Esteemed Contributor

Re: Set Analysis with two values, one with null

nothing is wrong on the expression above..

what do you have on the v_This_Year variable ?


would yo be able to share sample data or app ?