Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

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
Specialist II
Specialist II

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

View solution in original post

3 Replies
ogautier62
Specialist II
Specialist II

Hi,

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

regards

pawwy1415
Creator III
Creator III
Author

Hi ogautier62,

Thanks for you reply. I am working on Qliksense.

ogautier62
Specialist II
Specialist II

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