Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to write an expression to return a date when the OrderStatus is Cancelled.
If(OrderStatus ='Cancelled',SendingTime)
I thought the above would work, however it doesn't return any results.
I would appreciate any help with this issue.
Thanks,
Daniel
Are you sure this will be a single date? May be there are more than one dates, try concat to see if there are more than one dates here:
Concat(Distinct If(OrderStatus ='Cancelled', SendingTime))
Thanks Sunny, that works perfectly.
I was also trying to show the time difference between the order entry (SendingTime) and the cancellation. Date format is dd/mm/yyyy hh:mm:ss. Is this possible?
Thanks
Maybe you have more than one try
Min({<OrderStatus ={'Cancelled'}>}SendingTime)
How would you want to show this for multiple entries?
The field linking each record is the ClOrdID. If there are say three records and the last is cancelled, I would like to show the difference between the first = min(SendingTime) and cancelled date Concat(Distinct If(OrderStatus ='Cancelled', SendingTime))
Hope that makes sense?
Regards,
Daniel
I think cleveranjos's solution make sense here:
Min(SendingTime) - Min({<OrderStatus = {'Cancelled'}>} SendingTime)