Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Expert,
In My data 5 field CustomerCode,OrderNo,ReleaseDate,PendingDate,Qty and one variable field vDate we want to sum those data which vDate is greater than(>) ReleaseDate and vDate is less than(<) PendingDate, how to write condition please suggest.
if date fields and variable have the same format
sum({$ <ReleaseDate={"<$(vDate)"}, PendingDate>{">$(vDate)"}>} somefield)
The exact syntax could be different but you can use an if() condtion or Set Analysis to do this:
1. Sum( if( ReleaseDate > $(vDate) and PendingDate < $(vDate), Qty) )
or
2. Sum ( {<ReleaseDate={">$(vDate)"},PendingDate={"<$(vDate)"}>} Qty )
If neither works as is, see if you can post an app.
Sum( { <ReleaseDate = { "<$(Num(vDate))" } , PendingDate = { ">$(Num(vDate))" } > } Qty )
I think ... and maybe you should have <= and >= instead ? Inclusive ....
sum({$<RealeaseDate={"<=$(vDate)"},PendientDate={">=$(vDate)"}>}Field)