Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Average price formula - ERROR: Possible Divide by Zero
Hi, Im trying to return an average price for each item but Im not sure how to get around the divide by zero error. Im thinking NULLIF needs to be applied but im not sure where. Any advice?
sum(case when {item.custitem_year}='2015' then {amount} else 0 end)/sum(case when {item.custitem_year}='2015' then {quantity} else 0 end)
0