Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I have an issue with writing an or statement.
currently below is my if statement
if(Sum(REQ)>0 and REQUIREMENT_NEW ='27041' or REQUIREMENT_OLD='27041','NOT APPLICABLE','APPLICABLE') AS REQUIREMENT
But this statement is not returning the results.
i want to know if for an order i have Sum(REQ)>0 and if either of REQUIREMENT_NEW or REQUIREMENT_OLD is equal to 27041
then it it should give NOT APPLICABLE.
Now i also know why i am getting wrong results.
I am getting both NOT APPLICABLE and APPLICABLE for that particular order because i have values other than 27041 in the REQUIREMENT_OLD for that particular order.
i have attached an instance of my sample data and my sample output required
Regards,
Nadeem
Message was edited by: Nadeem Shaikh
You don't need to use an and, just evaluate the first condition then pass to another IF() if True;
if(Sum(REQ)>0, if(REQUIREMENT_NEW ='27041' or REQUIREMENT_OLD='27041','NOT APPLICABLE','APPLICABLE')) AS REQUIREMENT
Try this?
= if(Sum(REQ)> 0 AND (REQUIREMENT_NEW ='27041' or REQUIREMENT_OLD='27041'), 'NOT APPLICABLE', 'APPLICABLE') AS REQUIREMENT
Thank you for your reply gareth but this not work as i have multiple values for REQUIREMENT_OLD other than 27041
hI vISHWARATH ,
this does not work for the same reasons
Try This
if(Sum(REQ)>0 and ( REQUIREMENT_NEW ='27041' or REQUIREMENT_OLD='27041'),'NOT APPLICABLE','APPLICABLE') AS REQUIREMENT
can you pls share ur application
hi manoj,
i have attached the excel file along with output that is required
Regards,
nadeem
which u have shared the source file does't have REQ column
I have added the column