Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pawwy1415
Contributor II

IF LOGIC HELP

Hi Every one,

Can any one please help me on below requirement.

The below chart is build with Two Measures like below

Joiners = Count({<[J Flag]={'Y'}>}Distinct ID)

Leavers= Count({<[L Flag]={'Y'}>}Distinct ID)

When I have filtered this chart based on Group field by Dev record getting result as like 2nd chart. Feb 2018,Mar 2018, Apr 2018 and Jun 2018 months are hiding because there is no Y flag related Ids. In that case I have to how no data months with zeros to get the trend.

Please help me to write the if logic for joiners like below.

By default need to show Joiners for all the months like chart 1 by using below expression

= Count({<[J Flag]={'Y'}>}Distinct ID)

when user selects Dev Group it has to show like

if(Getselectedcount(Group), Count({<[J Flag]={'Y'}>}Distinct ID),'0')


Please help me on this.


Thanks in advance.

1 Solution

Accepted Solutions
ogautier62
Valued Contributor II

Re: IF LOGIC HELP

Hi,

it's the same in Sense :

but it doesn't display zero value, in spite of option checked

so change your formula as :

count(distinct if(flag='Y',ID))

it should work

regards

3 Replies
ogautier62
Valued Contributor II

Re: IF LOGIC HELP

Hi,

did you try to check 'continous' for dimension axis :

regards

pawwy1415
Contributor II

Re: IF LOGIC HELP

Hi ogautier62,

Thanks for you reply. I am working on Qliksense.

ogautier62
Valued Contributor II

Re: IF LOGIC HELP

Hi,

it's the same in Sense :

but it doesn't display zero value, in spite of option checked

so change your formula as :

count(distinct if(flag='Y',ID))

it should work

regards