Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can anyone tell me tat how can we write conditional and else statements in a single expression using set analysis.
Regards
krishna
Hi,
Can you come up with an example and sample output?
Regards,
Jagan.
Hi here is my expression.i'm getting output for only if condtion.Its not moving to another if.
=if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN='1' and CE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))))
Regards
Krishna
if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN='1' andCE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1)), elsepartexpression
)
)
and chcek breakets
Hi Sunil,
thank you for your reply..
In the above expression the second part is my expression its not working.The condition stops with first If condition itself.The else condition is the below one.
if(CE_CLOSE_YN='1'andCE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))
Regards
Krishna
Hello Kalyan,
Check your CE_CLOSE_DT and Today () format is matching or not.
also check without if statement your set analysis is working or not.
- Regards,
Vishal Waghole
Thank You Vishal
Regards
Krishna
Try like
=if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,
(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1)))
Or
=if( (CE_CLOSE_YN ='1' and CE_CLOSE_DT < Today()),0,
if( (CE_CLOSE_YN ='1' and CE_CLOSE_DT > Today()),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))))
if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN='1' andCE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))), you right here your else part or another if)
as you have already two if one for 0 and other for set expression i.e Sum(....),
HPH
Hi Sunil,
Thank You for your Reply.
My Expression is totally like above.In that i need to check two conditions.The second if condition and sum will be in else part.
Regards
Krishna