Kris Jones
04/23/2019, 9:59 PMNVL2(
{ item.averagecost },
TRUNC(
SUM(
NVL({ amount }, 0) - NVL({ item.averagecost }, 0) * { quantity }
) / SUM(NULLIF({ amount }, 0)),
2
) * 100,
TRUNC(
SUM(
NVL({ amount }, 0) - NVL({ item.lastpurchaseprice }, 0) * { quantity }
) / SUM(NULLIF({ amount }, 0)),
2
) * 100
)
Netsuite's not giving me a lot to go off with their error lol - the `TRUNC()`s work individually but not as part of NVL2 🤷stalbert
04/23/2019, 10:22 PMKris Jones
04/23/2019, 10:54 PM