Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am trying to enable if condition to create a calculated field called Results.DateShip.
However I get strange result for Results.DateShip = 570710725 and 570710731
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='good',
EO1.DateShip,
Date(today(),'YYYYMMDD')),
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='late',
EO1.DateShip,
Date(today()+1,'YYYYMMDD')),
if(Final.DateRequest>today(),
EO1.DateShip,
Date(Final.DateRequest,'YYYYMMDD')) as Results.DateShip
Can anyone suggest where I am going wrong ?
Thanks for any help.
you may try it like this date(today(),'YYYY/MM?DD')
Hi,
Are you getting results without error? seems there is an error with nested if. can you post the sample?
May be try like this..
if(not (Final.DateRequest<=today() and ECL.CutoffTimeCheck='good'),
Date(today(),'YYYYMMDD'),
if(not (Final.DateRequest<=today() and ECL.CutoffTimeCheck='late'),
Date(today()+1,'YYYYMMDD'),
if(not (Final.DateRequest>today()),
Date(Final.DateRequest,'YYYYMMDD'),
if((Final.DateRequest<=today()and (ECL.CutoffTimeCheck='good' or ECL.CutoffTimeCheck='late')) or (Final.DateRequest>today()),
EO1.DateShip)))) as Results.DateShip
Hi,
Please try:
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='good', EO1.DateShip, Date(today(),'YYYYMMDD'),
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='late', EO1.DateShip, Date(today()+1,'YYYYMMDD'),
if(Final.DateRequest>today(), EO1.DateShip, Date(Final.DateRequest,'YYYYMMDD')
)
)
) as Results.DateShip
It looks to me that the comma was not on the right place. Please try this.
I think, comparing of Date at UI would not work with if condition...
Would suggest to do same at script something like this?
Comparing 2 date fields set analysis
Also make sure format should be same while comparing like this?
Hi,
Nested If syntax is
=If(Conditon1, True Expression1,
If(Condition2, True Expression2,
If(Condition3, True Expression3, False Expression) AS DimName
So your expression should be
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='good',
EO1.DateShip,
if(Final.DateRequest<=today()and ECL.CutoffTimeCheck='late',
EO1.DateShip,
if(Final.DateRequest>today(),
EO1.DateShip,
Date(Final.DateRequest,'YYYYMMDD')) ))as Results.DateShip
Hope this helps you.
Regards,
jagan.