Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

KPI Calculation help

Hi Experts,

Can any one please help me on below requirement.

I have a Straight table like below image.

 

 Here Flag is calculated in UI like below

if(Sytemdate>=startdate      and  Sytemdate<=Enddate  ,'1' ,'0'  )

When Systemdate present in between Start and End dates then it has to show 1 else 0.

Requirement:

In a KPI how to calculate the  Number of Distinct IDs where Flag = '1'. Here flag is calculated in UI with above expression.

Can't apply the flag in backend.

I have tried like below in the below scenario but getting 0 instead of 2

KPI.png

Please help me on this.

 

Thanks in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try count({<ID={"= [SystemDate]>=[StartDate] AND [SystemDate]<=[EndDate]"}>}distinct ID)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try count({<ID={"= [SystemDate]>=[StartDate] AND [SystemDate]<=[EndDate]"}>}distinct ID)


talk is cheap, supply exceeds demand
ahmed_hassan
Contributor III
Contributor III

Hi,  

if(Sytemdate>=startdate      and  Sytemdate<=Enddate  ,'1' ,'0'  ) as  Sytemdate_count 

and then try to count it e.g.  =Count({$<[Sytemdate_count]={1}>}Sytemdate_count)

Good luck!