8 Replies Latest reply on Sep 16, 2019 7:20 AM by Zhouyi Zhang

# Stuck in IF ELSE condition

Hi Guys,

I am stuck in one issue, the scenario is my client wants result by logs which I have mentioned in the screenshot.

In the screenshot, I have done yellow marked which i expecting an answer but I'm getting the result which I have mentioned as in getting the result by using below calculated field. pleas help me through.

much appreciated in advance and apologize for couldn't allow using the workbook. please use the sample data source as I referenced in the screenshot.

 IF ISNULL([YesNo Status]) = True THEN '5' ELSEIF DATEDIFF('day', TODAY(), [ExpiryDate])<=[WarningDays] AND DATEDIFF('day', TODAY(), [ExpiryDate] )>0 THEN '2' ELSEIF ([YesNo]) = True THEN '3' ELSEIF [NotApplicable] = TRUE THEN '1' ELSE '4' END

Regards

Rohit Andhale

• ###### 1. Re: Stuck in IF ELSE condition

Hi, rohit

You can't get what you expected as this is your logic and it is correct as I analysis below unless you have different logic to apply

ZZ

• ###### 2. Re: Stuck in IF ELSE condition

Thanks, Zhouyi for the speedy reply,

Then could you please suggest me to use exact logic to achieve my result.

Thanks

RA

• ###### 3. Re: Stuck in IF ELSE condition

so something like this?

ZZ

• ###### 4. Re: Stuck in IF ELSE condition

Hi @ZZ

I am afraid this logic does not working.

Thanks

RA

• ###### 5. Re: Stuck in IF ELSE condition

so you need tell me what kind of business logic is

ZZ

• ###### 6. Re: Stuck in IF ELSE condition

HI ZZ

In simple words, the logic of business is, where I can get the data(warning days consist of the data 0to90 days) (Expiry date means the documents life)

hope this will helps to get what I am trying to tell you.

if the values are null then 'unknown' and the documents expiry date is between 0 to 90 then it should be 'due to expire' and if the documents expiry date is greater than 90 then 'No'

and if the documents expiry date less than 0 (means expired) then 'Yes' rest result show as N/A.

• ###### 7. Re: Stuck in IF ELSE condition

Hi, Rohit

According to your logic, if expiry date less than 0, it is 'Yes' which is "3" the calculation I attached yesterday, below below highlighted.

Can you tell why this is not working? I am confused~~

ZZ

• ###### 8. Re: Stuck in IF ELSE condition

Hi, Rohit