Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ravikumar_iyana
Contributor

How to write if() in Set Analysis

please let me know how to correct this expression

but inside i want restrict on field 'MonYY'

MonYY: List box

I am tried this = 'Ad-hoc Users :  ' & count({<MonYY=, if(Len(Adhoc_Lanid)>0,Adhoc_Lanid)>})


10 Replies
qlik_aparnav
Contributor II

Re: How to write if() in Set Analysis

try this,

if(len(adhoc_Lanid)>0,count(adhoc_Lanid))

martinpohl
Valued Contributor II

Re: How to write if() in Set Analysis

so it is

Count({<Lanid={">0"}>} Lanid)

and

Count({<Adhoc_Landid={">0"}>}Adhoc_Lanid)

maybe Need a distinct?

regrads

ravikumar_iyana
Contributor

Re: How to write if() in Set Analysis

Hi Aparna,

Thanks for u r valuable response but inside i want restrict on field 'period'

period: List box

qlik_aparnav
Contributor II

Re: How to write if() in Set Analysis

Can you pls elaborate, should period be restricted to a value or string?

ravikumar_iyana
Contributor

Re: How to write if() in Set Analysis

please let me know how to correct this expression

but inside i want restrict on field 'MonYY'

MonYY: List box

I am tried this = 'Ad-hoc Users :  ' & count({<MonYY=, if(Len(Adhoc_Lanid)>0,Adhoc_Lanid)>})

agigliotti
Honored Contributor II

Re: How to write if() in Set Analysis

maybe this:

=count( {< MonYY=, Adhoc_Lanid = {"=Len(Adhoc_Lanid)>0"} >} Adhoc_Lanid )

Re: How to write if() in Set Analysis

ravi kumar wrote:

please let me know how to correct this expression

but inside i want restrict on field 'MonYY'

MonYY: List box

I am tried this = 'Ad-hoc Users :  ' & count({<MonYY=, if(Len(Adhoc_Lanid)>0,Adhoc_Lanid)>})

You can not this? Look agigliotti Response ..

Life is so rich, and we need to respect to the life !!!

Re: How to write if() in Set Analysis

May be this, where Adhoc_Lanid = {"*"} will exclude all null values in Adhoc_Lanid field....

'Ad-hoc Users :  ' & Count({<MonYY=, Adhoc_Lanid = {"*"}>} Adhoc_Lanid)

ravikumar_iyana
Contributor

Re: How to write if() in Set Analysis

Hi Sunny,

Thanks for your valuable assistance

Thanks,

Ravi

Community Browser