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

Writing multiple if conditions

Hi All,

I Need help in using multiple if conditions for the below requirement.

Source data:

   

TEAMPROCESS% Process
MLTVLast Submit to First TV Checked39%
MLTVLast Submit to First TV Action92%
LOAMFinal Approval to First Response97%
LOAMFinal Approval to LO Gen80%

Requirement 1:

To Count Number of process in each teams & No of process that has more than 50% value. i achieved this using below expression

Output1:  

TeamMet Target
MLTV  1/2
LOAM  2/2

Script1:

= if(GetSelectedCount(TEAM)=0,

sum(Aggr(

IF(count(DISTINCT{$<[END DT]={"*"},%ProcessingType={'End'},PROCESS={'*'}-{'First TV Pickup to First TV Checked By TVO'}, [SLA BUCKET]={'1'}>} [CASE_NUM]) /

   count(DISTINCT{$<[END DT]={"*"},%ProcessingType={'End'},PROCESS={'*'}-{'First TV Pickup to First TV Checked By TVO'}>} [CASE_NUM])>=0.5,1,0),PROCESS))

   & '/' & count( DISTINCT (IF(PROCESS<>'First TV Pickup to First TV Checked By TVO',PROCESS))))

,0))

  

Requirement 2:

To get the number of teams that has met 100% target in a text box

Output2 Needed:


   1/2

out of 2 teams only  LOAM Team has met 100% Target(2/2). so output should be 1/2.


Script2:

i used below script but my condition is applying condition on process level, below script is giving output as 0, because condition is applied at process level, since not all  process met target its resulting 0.



=if(GetSelectedCount(TEAM)=0,

IF(sum(Aggr(

IF(count(DISTINCT{$<[END DT]={"*"},%ProcessingType={'End'},PROCESS={'*'}-{'First TV Pickup to First TV Checked By TVO'}, [SLA BUCKET]={'1'}>} [CASE_NUM]) /

   count(DISTINCT{$<[END DT]={"*"},%ProcessingType={'End'},PROCESS={'*'}-{'First TV Pickup to First TV Checked By TVO'}>} [CASE_NUM])>=0.5,1,0),PROCESS))=

   count( DISTINCT (IF(PROCESS<>'First TV Pickup to First TV Checked By TVO',PROCESS))),1,0))

Please Help with a solution.

Thanks In Advance.

Arjin.



0 Replies