Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an If statement that is not working as desired. I have the following expressosion set named 'test':
IF(
(DATE(DATEINWIP) <= DATE(vpeildatum)
OR
len(DATEINWIP) = 0)
AND
(len(DATEOUTWIP) = 0
OR
DATE(DATEOUTWIP) > DATE(vpeildatum))
AND
(date(DATEFINANCIALFINISHED) > vpeildatum
or
len(DATEFINANCIALFINISHED) = 0)
, -1,0)
note : The variable vpeildatum is set to 6-12-2022
But the result is not correct:
on the rows with DATEINWIP = 06-12-2022 the column test should always display -1 but it only works on the last row with 06-12-2022 . What could cause this?
Thanks in advance.
Kind regards,
Simon
add each of these conditions as seperate measures to verify which condition is failing,
(date(DATEFINANCIALFINISHED) > vpeildatum
or
len(DATEFINANCIALFINISHED) = 0)
(len(DATEOUTWIP) = 0
OR
DATE(DATEOUTWIP) > DATE(vpeildatum))
(DATE(DATEINWIP) <= DATE(vpeildatum)
OR
len(DATEINWIP) = 0)
The expression with DATEINWIP is failing.
Adding the seperate IF expressions the test expression is fully broken. How is this possible?
I changed the expression of DATEINWIP to :
(DATE(DATEINWIP-1) < DATE(vpeildatum)
OR
len(DATEINWIP) = 0)
Instead of using <= I just subtracted one day of DATEINWIP and used <. This works, but I am still wondeirng why the simple statement <= does not work.