ANS-0031 · SAVED SEARCHES & FORMULAS

How to Calculate Gross Profit Percentage in NetSuite Reports?

This guide provides the NetSuite formula for calculating Gross Profit Percentage, emphasizing the correct aggregation of income and cost data.

Short answer

To calculate Gross Profit Percentage in NetSuite, ensure all income and cost components are summed. The formula handles cases where income is zero to prevent division errors, returning 0 in such instances, otherwise calculating (Sum of Income - Sum of Cost) / Sum of Income.

Scenario

Users often need to display Gross Profit Percentage in NetSuite reports or custom fields. A common challenge is ensuring that the underlying financial data, specifically income and cost figures, are correctly aggregated before performing the percentage calculation, which can lead to incorrect results if not handled properly.

Solution

To accurately calculate Gross Profit Percentage in NetSuite, it is crucial to ensure that all relevant income and cost components are properly summed. The following formula should be used to achieve this, incorporating a check for zero income to prevent division errors:

CASE WHEN
  {income}  0
THEN
  0
ELSE
  (SUM({income}) - SUM({cost})) / SUM({income})

This formula first checks if the total income is zero. If it is, the Gross Profit Percentage is set to 0. Otherwise, it calculates the percentage by subtracting the sum of costs from the sum of income, and then dividing the result by the sum of income.

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant