Is it possible to do an aggregate row with a condi...
# suitescript
s
Is it possible to do an aggregate row with a condition with netsuite? On the first row I want it to do a - b and all subsequent rows, I want it to do a - c. Is this possible? I have this so far which gets me so close! But I only want the formula to subtract the back ordered quantity once. Currently it is doing it every time
sum/* comment */({quantity}-NVL({item.locationquantitybackordered}, 0)) OVER(PARTITION BY {item} ORDER BY {tranid} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
HA!!! I've worked on this like crazy for 5 hours and as I wrote this question out, the answer came to me. So simple and should of written out the issue 5 hours ago lol
sum/* comment */({quantity}) OVER(PARTITION BY {item} ORDER BY {tranid} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) - NVL({item.locationquantitybackordered}, 0)