首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

很简单的DW的有关问题,帮解决了马上给分

2013-04-21 
很简单的DW的问题,帮解决了马上给分grid风格的dwybhxs1232123212324561456178947894TOTAL:2+1+47如何在下

很简单的DW的问题,帮解决了马上给分
grid风格的dw
ybh   xs
123   2
123   2
123   2
456   1
456   1
789   4
789   4
TOTAL:2+1+4=7

如何在下面的汇总里统计出xs这列按ybh分组后的和,即2+1+4=7
我这样写的:sum(xs for all) ,可结果却是2+2+2+1+1+4+4,想去掉重复,该怎么写这个汇总函数呢

右边写你的计算域
先分组 sum(  contract_comesthefunds  for group 1 )
再统计 sum(xs for all)
[解决办法]
sum(xs for all DISTINCT)
[解决办法]


看帮助 Sum DataWindow expression function
Sum ( column { FOR range { DISTINCT { expres1 {, expres2  {, ... } } } } } )

Assuming a DataWindow object displays the order number, amount, and line items for each order, this computed field returns the sum of the order amount for the distinct order numbers:

Sum(order_amt for all DISTINCT order_nbr)


[解决办法]
计算域,表达式为:sum(xs for all distinct)

热点排行