问题
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