NetSuite saved search formula to find the difference of two custom columns

梦想的初衷 提交于 2021-01-29 09:20:52

问题


I'm trying to make a saved search to find out which assemblies can be built by determining if all the components are in stock. So I currently have this in one column CASE WHEN {memberitem.quantityavailable} > 1 THEN 1 ELSE 0 END in conjuntion with a sum summary type. I also have a column with "Member Item" selected and a count summary type. How do I make a third column that calculates the difference between these two? (What would I use for the column names essentially) Is this possible? Thanks!


回答1:


You should be able to do this:

SUM( [first column] ) - COUNT( [second column] )

and set the Summary Type to MIN (with this approach the actual aggregation is taking place within your formula, but you still have to select a summary type for the result to display.)

You haven't provided a formula for the second column, so I can only guess what the actual formula you will need is. If you have just selected a field you would have to convert that to a formula for the purpose of this column. The end result would be something like:

SUM(CASE WHEN {memberitem.quantityavailable} > 1 THEN 1 ELSE 0 END) - COUNT({memberitem})


来源:https://stackoverflow.com/questions/60422075/netsuite-saved-search-formula-to-find-the-difference-of-two-custom-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!