Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community members,
I have a problem with a variable in my aggregation formula:
=Sum(If(Aggr(NODISTINCT Max(DEVEMPDATEKEY,240),SUBDEVICE_ID='2')<=DEVEMPDATEKEY,1,0) * AMOUNT)
I want a substitute for the part SUBDEVICE_ID='2' into a variable: {<SUBDEVICE_ID={"$(vDevIdStation1)"}>}
Please help me with the syntax.
Many thanks, Gerard.
Try
=Sum(If(Aggr(NODISTINCT Max({<STATION={"$(='0'&vStation1)"}>}DEPSTATDATENR,60),STATION)<=DEPSTATDATENR,1,0) * QTYPC)
Because your variable doesn't contain the value 02, but 2 it's necessary to add the 0 in the set modifier.
Can you please elaborate your expression ?
Hi Manish,
See attached file. The station is now a fixed number in the aggr function and I like to work with a variable.
The expression is about the last 60 and 240 records of a aggregated sorting per station.
Many thanks for your answer.
Gerard.
Try
=Sum(If(Aggr(NODISTINCT Max({<STATION={"$(='0'&vStation1)"}>}DEPSTATDATENR,60),STATION)<=DEPSTATDATENR,1,0) * QTYPC)
Because your variable doesn't contain the value 02, but 2 it's necessary to add the 0 in the set modifier.
Hi Gysbert,
That’s brilliant!!
The 2 and 02 was my error, the former result set was without the 0.
It’s working perfectly now!
Many thanks, Gerard. (oftewel: SUPER bedankt man!!)