Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
yogitamehta10
Creator
Creator

two conditions in if statement

Hi all,

I have a expression

what I want to do here is if  criteria no Q9  and its assessment is 'Y'

and then it should match with criteria no P11  and its assessment is 'Y'

if both  value should be Y then only it would be Y for a ID otherwise  it would be 'No'

not sure I'm using right expression or not.

I have a field table a

ID   brand  criteria            assesement

123  abc     Q9                       Y

145   abc      Q9                     Y

ID   brand  criteria            assesement

123  abc     P11                     Y

145   abc      P11                   N

one id can be used for different criteria.

if (if([CriteriaNo=('Q9'),AssessmentManual=('Y')) and  if(CriteriaNO=('P12'),Assessment=('Yes')), 'Yes','No')

anyhelp??

7 Replies
Anil_Babu_Samineni

May be this

if(match([CriteriaNo,'Q9','P12'),if(match(Assessment,'Y') , 'Yes','No'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vinieme12
Champion III
Champion III

Try below

if(Count({<[CriteriaNo]={'Q9','P11'},AssessmentManual={'Y'} >} ID)=2, 'Yes','No')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Yogita,

I have a doubt criteria P9 and P11 are available in same table or Different.

Thanks,

Arvind Patil

yogitamehta10
Creator
Creator
Author

P9 and Q11 are in different table  I need to match the values of it on the basis of ID.

Suppose  ID

table 1

ID   brand  criteria            assesement 

123  abc     P11                     Y           it has value Y for ID 123  and I have to match this with                                                                     is Q9    that is in table 2 then if both are Y  then its Y otherwise N

145   abc      P11                   N

table 2

123  abc     Q9                       Y

145   abc      Q9                     Y

vinieme12
Champion III
Champion III

have you tried the expression i posted above

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
yogitamehta10
Creator
Creator
Author

this is not the way. I want both conditions to be true only then it can become yes.

P11 and Q9are in different table  I need to match the values of it on the basis of ID.

Suppose  ID

table 1

ID   brand  criteria            assesement 

123  abc     P11                     Y           it has value Y for ID 123  and I have to match this with                                                                     is Q9    that is in table 2 then if both are Y  then its Y otherwise N

145   abc      P11                   N

table 2

123  abc     Q9                       Y

145   abc      Q9                     Y

girish2195
Contributor II
Contributor II

Hi Yogita,

Try this.

what I want to do here is if  criteria no Q9  and its assessment is 'Y'

and then it should match with criteria no P11  and its assessment is 'Y'

if((Criteriano='Q9' and Assesment='Y') and ((Criteriano=P11and Assesment='Y'),'Y','N')

Regards,

Girish Kumar DV