Skip to main content
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.

2 Replies
el_aprendiz111
Specialist
Specialist

hi,

one solution from in script,, 1 example

IFCON.png

effinty2112
Master
Master

Hi Arjin,

                    Try the expression in this table to get your first output

TEAM count({$<[% Process] = {">0.5"}>}PROCESS) & ' / ' & count(PROCESS)
MLTV1 / 2
LOAM2 / 2

A textbox with this expression:

=Sum(Aggr(if((count(DISTINCT {$<[% Process] = {">0.5"}>}PROCESS) / count(PROCESS))=1,1), TEAM)) &  ' / ' & Count(Distinct TEAM)

will return

1 / 2

Kind regards

Andrew