Does anyone know how to do advanced math in Netsui...
# general
a
Does anyone know how to do advanced math in Netsuite like taking a set of data points - monthly sales from IFFs of an item, and using that to perform a standard deviation? I can do the analysis in formulas in Excel but because I can pull the data set down and reference a row worth of data and Excel can sequence it (which is important to determine 25% and 75% to do the standard deviation on that data).
m
I haven't tried but there is a
STDDEV
oracle function you may be able to use in a saved search
a
hmm, how could I run this oracle function in a saved search? I've never used any functions outside of the few available in the Netsuite drop downs in the saved search formula fields
m
You would use a formula numeric column, e.g.
STDDEV({fieldname})
a
To do standard deviation you have to bring in a bunch of data points though - like 12 months worth of quantities, broken down by month, it's not just STDDEV({quantity}) it's like take all the quantities, add them up by month, then take that array of 12 numbers and do a standard deviation of those 12 data points
That's the hard part
m
Try grouping the search by month
a
The formula would still be running on that particular month's row - wouldn't work as far as I can tell
It needs to see all the rows even if grouped by month
m
Ah then maybe the analytic version would work
a
Yeah I've never messed with SuiteAnalytics, going to try tomorrow, let me know if you have seen any good tutorials on it
Thanks!
m
To be clear I meant the analytic version of STDDEV but was still thinking about using a saved search
Something like
STDDEV({quantity}) OVER (PARTITION BY TO_CHAR({trandate}, 'MM-YYYY')
a
Just gives ERROR: Invalid Expression
Ah well, thanks though