[英]Formula in Netsuite Saved Search
I have a problem here. 我在这里有问题。 In Column 1 I have count of All he transaction, In column 2 I have Count of transaction of specific status.
在第1栏中,我具有所有他的交易计数,在第2栏中,我具有特定状态的交易计数。 In column 3 I want the percentage of above 2;
在第3列中,我希望高于2的百分比; like count of specific transaction/Count of total.
例如特定交易的计数/总数。 Is it possible in Netsuite?
Netsuite中可能吗?
Actually there is an interesting feature that makes this possible. 实际上,有一个有趣的功能使之成为可能。 Formula fields that have aggregate functions work when the row has an aggregate on it.
具有聚合功能的公式字段在行上具有聚合时起作用。 So for instance if you wanted to see a percentage of orders with status Billed on a Sales Order search you would enter a Formula (Percent) result with a formula like:
因此,举例来说,如果您想在销售订单搜索中查看状态为“开票”的订单百分比,则可以输入包含以下公式的公式(百分比)结果:
sum(case when {status} = 'Billed' then 1 else 0 end) / count({tranid})
and apply an aggregate to that column. 并将汇总应用于该列。 The sample uses Maximum but Minimum and Average produce the same result.
该示例使用最大值,但最小值和平均值产生相同的结果。
I think that isn't possible by just saved search. 我认为仅保存搜索是不可能的。
You will have to group on search result column status
, so, all the count total will be based on statuses and you can't write aggregation based on other search results' columns. 您将必须对搜索结果列的
status
进行分组,因此,所有总数都将基于状态,并且您不能基于其他搜索结果的列来编写汇总。
you can further write a suitelet/portlet script to use the saved search result and calculate the stats before presenting on UI. 您还可以编写一个Suitelet / Portlet脚本,以使用保存的搜索结果并计算统计信息,然后再显示在UI上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.