Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pooja821
Creator
Creator

three if condition together

How to use three if condition into one expression separately.

5 Replies
zhadrakas
Specialist II
Specialist II

beck_bakytbek
Master
Master

Hi Pooja,

look at this interesting issue: http://www.qlikblog.at/464/tool-creating-nested-ifstatements/

i hope that helps

Beck

d_prashanthredd
Creator III
Creator III

Hi,

If(Condition1 and/or Condition2... Condition-n, 'True Statement', 'False Statement')

nested if..

If(Condition1 and/or Condition2... Condition-n,

    If(TrueCondition1 and/or TrueCondition2.., 'True Statement' , //This is nested if True

           If(TrueCondition1 and/or TrueCondition2. , 'True Statement',  'False Statement') // This is nested if False

     )

)

you can write any number of if statements for true/false statements.

Thanks.

pooja821
Creator
Creator
Author

I need to use it with aggregation function.

d_prashanthredd
Creator III
Creator III

Just I used my data to illustrate.. You can have a look at the column format... in the same example I used nested if to color the text.

if(Sum(Aggr($(vUtilizationHrs), Resource, Team, Month))/($(vAvailableHrs)) >= .50, 

    if(Sum(Aggr($(vUtilizationHrs), Resource, Team, Month))/($(vAvailableHrs)) >= .80, 'G80+', 'G50-79'),

    if(Sum(Aggr($(vUtilizationHrs), Resource, Team, Month))/($(vAvailableHrs)) <= .30, 'L30-', 'L31-49')

)

Thanks,