|
对不起,话题不好-我需要计算总计,但需要在一定条件下重置总计(当预期达到时= 0时)。我有这张桌子:: T6 R1 L, o- t- U1 E/ r
Date,Registrations,Expected Registrations,Expected reached -03-01,5,4,1 -03-02,7,5,1 -03-03,8,6,1 -03-04,2,5,0 -03-05,5,4,1 -03-06,7,5,1 -03-07,8,6,1 -03-08,2,5,0总运行预期结果-条件是预期达到
4 Y5 ~5 a8 Z7 e1 W' G* NDate,Registrations,Expected Registrations,Expected Reached,Running Total -03-01,5,4,1,1 -03-02,7,5,1,2 -03-03,8,6,1,3 -03-04,2,5,0,0 -03-05,5,4,1,1 -03-06,7,5,1,2 -03-07,8,6,1,3 -03-08,2,5,0,0我不知道如何划分我的窗口函数来实现这个目的。也许我必须在之前创建中间计算,但不确定。有什么建议?
# Z+ n+ u* m' s" g% ]编辑:edit2.删除我的即时问题。
" \! A" e+ N9 e
' I$ J6 s8 [7 `7 r/ L' S" y 解决方案: |
|