Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this existing expression
round(Avg({<[Item Type]={'Inventory Item','Inventory Cebu'}>}Aggr(Date([Order Date1],'DD/MM/YYYY') - date([Approved Date],'DD/MM/YYYY'),
[Purchase Order No.],ShipID)))
I want to add that if Date([Order Date1],'DD/MM/YYYY') - date([Approved Date],'DD/MM/YYYY') is negative it would use Order Date 2.
And also if Date([Order Date1],'DD/MM/YYYY') - date([Approved Date],'DD/MM/YYYY') is negative and also Order date 2 is null it will not add up to the round(avg).
If you want to add such conditions you will need some simple but probably nested if-loops, like:
... if(DateZ = null(), null(), if(DateX - DateY < 0, DateZ - DateY, DateX - DateY)) ...