Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Multiple if conditions

Hello Everyone,

Please help me I am stuck , I have a scenario in which I am using multiple if condition as

if(Sum(TO)>vTH,'Y',IF(Sum(TE)>vTH,N,if(Sum(TC)>vTH,Q,B))) so my problem is if the first condition is true it will not check second condition although I want to check all the conditions and return different values depending on the conditions.

Thank you

Ferha Sharma

1 Solution

Accepted Solutions
sunny_talwar

If it hits the true, the condition won't move forward... may you want something like this

If(sum(ABC)>vTh,'Value for ABC exceeds Thresh hold') & Chr(10)

If(sum(DEF)>vTh,'Value for DEFexceeds Thresh hold') & Chr(10)

If(sum(AO)>vTh,'Value for AO exceeds Thresh hold')

Now the above are three different conditions with there true values. It won't depend on the other condition being met.

View solution in original post

7 Replies
sunny_talwar

Do you have few rows of sample data you can share and explain what you are looking to get?

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

If(sum(ABC)>vTh,'Value for ABC exceeds Thresh hold',if(sum(DEF)>vTh,'Value for DEFexceeds Thresh hold',if(sum(AO)>vTh,'Value for AO exceeds Thresh hold')))

sunny_talwar

Couple of questions

1) Is this needed in the script or front end?

2) What would this look like? 3 new columns?

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

This condition I have to place in mail alert message , but I want to know how it will check all the condition although the very first condition is true. so this is my main concern.

sunny_talwar

If it hits the true, the condition won't move forward... may you want something like this

If(sum(ABC)>vTh,'Value for ABC exceeds Thresh hold') & Chr(10)

If(sum(DEF)>vTh,'Value for DEFexceeds Thresh hold') & Chr(10)

If(sum(AO)>vTh,'Value for AO exceeds Thresh hold')

Now the above are three different conditions with there true values. It won't depend on the other condition being met.

zebhashmi
Specialist
Specialist

I think use if in result as well

like

if(Sum(TO)>vTH,'(IF(Sum..)',(IF(Sum(..)

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Thank you Sunny