Vedachalam Mahadevan
03/03/2025, 1:35 AMCeligo AI
03/03/2025, 1:35 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems that the issue arises when trying to use the AVERAGE summary type on a formula in a saved search in NetSuite. The AVERAGE summary type seems to work on a per-field basis, meaning it averages each data field individually. When you try to use it on a formula that involves multiple fields, it doesn't give the expected result. For example, if you have a formula that adds three fields (A, B, and C) and you use the AVERAGE summary type, it doesn't average the sum of the three fields. Instead, it adds the three fields together on every detail line of the saved search, then averages all of those detail lines into a summary line. This results in averaging identical values, which is not the intended result. A workaround suggested in the conversations is to use the SUM summary type and adjust the formula to
(A+B+C)/3
. This effectively gives you the average of the three fields.
In another conversation, it was mentioned that dividing fields in a formula can cause issues. A solution to this is to use the NULLIF function to handle cases where the denominator is zero, as dividing by zero can cause errors.
For example, if you have a formula SUM({averagecost}/{pricelevel2})
, you can modify it to SUM({averagecost}/NULLIF({pricelevel2}, 0))
to avoid errors when pricelevel2
is zero.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/03/2025, 1:35 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.879511356
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851587713
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.849900782
Celigo AI
03/03/2025, 1:35 AM