Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Formula (Percent) Average is Summerized a Few Points Off
In my summarized search, I have a column that does an average of profit per sale depending on whether all our numbers are in or not.
It looks like this:
Field: Formula (Percent)
Grouping: Average
The formula: CASE WHEN {custbody_origshipcost} IS NOT NULL THEN {custbody_origprofit}/nullif({amount},0) END
|| CASE WHEN {custbody_origshipcost} IS NULL THEN {custbody_profit}/nullif({amount},0) END
When viewing the search in detail, all the percents are correct. When viewing them in summery, they're a few points too high (like, should be 43.215%, is 46.121%)
There are 2 more fields that show me a sum of the amount and sum of the profit (it's also found on a transaction level). The percent field doesn't match the math done with these numbers.