- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if formula in script
Hi,
I Need some quick help. It´s stupid but I can just not see my error in my formula here:
if(Status = 3,
if(floor(ConfirmedReceiptDate = '01.01.1800',((floor(ReceiptDate2)) - (floor(PlannedReceiptDate)),
((floor(ReceiptDate2)) - (floor(ConfirmedReceiptDate))))))) as OnTimeDeliveryInDays,
Staring at this for a lot of time now I´m sure it´s quicker to get some help from somebody here 🙂
Best regards
Carolin
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Carolin,
try this:
if(Status = 3,
if(floor(ConfirmedReceiptDate) = '01.01.1800',(floor(ReceiptDate2)) - (floor(PlannedReceiptDate)),
((floor(ReceiptDate2)) - (floor(ConfirmedReceiptDate))))) as OnTimeDeliveryInDays,
Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Carolin,
try this:
if(Status = 3,
if(floor(ConfirmedReceiptDate) = '01.01.1800',(floor(ReceiptDate2)) - (floor(PlannedReceiptDate)),
((floor(ReceiptDate2)) - (floor(ConfirmedReceiptDate))))) as OnTimeDeliveryInDays,
Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
=if(Status = 3,
if(floor(ConfirmedReceiptDate) = '01.01.1800',floor(ReceiptDate2) - floor(PlannedReceiptDate),
floor(ReceiptDate2) - floor(ConfirmedReceiptDate)
)
) as OnTimeDeliveryInDays,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a missing bracket behind the date-field:
floor(ConfirmedReceiptDate = '01.01.1800'
Also there are too many unnecessary brackets around floor and the subtraction - this is only confusing.
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, this was perfect for copy and paste 🙂 I knew it had to do with the brackets but I couldn´t see it anymore...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this expression
if(Status = 3
And
floor(ConfirmedReceiptDate) = '01.01.1800',
(floor(ReceiptDate2) - floor(PlannedReceiptDate)),
(floor(ReceiptDate2) - floor(ConfirmedReceiptDate))) as OnTimeDeliveryInDays
Or
if(Status = 3,
if(floor(ConfirmedReceiptDate) = '01.01.1800',
(floor(ReceiptDate2) - floor(PlannedReceiptDate)),
(floor(ReceiptDate2) - floor(ConfirmedReceiptDate)))) as OnTimeDeliveryInDays
Regards
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
if(Status = 3,
if(floor(ConfirmedReceiptDate) = '01.01.1800',floor(ReceiptDate2) - floor(PlannedReceiptDate),
(floor(ReceiptDate2) - floor(ConfirmedReceiptDate)))) as OnTimeDeliveryInDays