[英]NetSuite saved search formula to find the difference of two custom columns
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.
所以我目前在一个列 CASE WHEN {memberitem.quantityavailable} > 1 THEN 1 ELSE 0 END 中与总和摘要类型结合使用。 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!
谢谢!
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.)并将汇总类型设置为 MIN(使用这种方法,实际聚合发生在您的公式中,但您仍然必须选择汇总类型以显示结果。)
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})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.