ANS-0107 · SAVED SEARCHES & FORMULAS
How Do NetSuite Saved Search Absolute Value Functions Differ with SUM?
This guide clarifies the behavior of absolute value calculations in NetSuite saved searches when using a 'SUM' summary type.
Short answer
In NetSuite saved searches, using the ABS() operator in a formula with a 'SUM' summary type calculates the sum of the absolute values (pre-aggregation). The behavior of the 'Absolute Value' function dropdown with 'SUM' for post-aggregation absolute value is not explicitly confirmed and may also result in pre-aggregation.
Scenario
Users often need to calculate absolute values of financial or quantitative data within NetSuite saved searches. A common point of confusion arises when attempting to sum these values, specifically regarding whether the absolute value is applied before or after the summation, depending on the method chosen.
Solution
When configuring a NetSuite saved search with a 'SUM' summary type, the method used to apply absolute values significantly impacts the calculation outcome. When 'Summary type = SUM' is selected and the 'Absolute Value' function is chosen from the dropdown for a column, the system's behavior regarding whether it calculates the absolute value of the sum (i.e., absolute value of the result, post-aggregation) is not explicitly confirmed in current NetSuite documentation. Based on general principles of how functions are applied to columns in NetSuite, this method may apply the absolute value on a per-record basis before summing, similar to the ABS() operator. In contrast, when 'Summary type = SUM' is selected and the ABS() operator is utilized within a formula, NetSuite consistently calculates the sum of the absolute value. This means each individual value is first made absolute, and then these absolute values are summed together. For example, a formula field might look like this:
ABS({amount})In this scenario, if the original values were -10, 5, -3, the ABS() operator would first convert them to 10, 5, 3, and then the 'SUM' summary type would result in 18.
Expert NetSuite Support
Need help with this NetSuite issue?
Saved Searches & Formulas consulting and configuration support
