以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]表达式包含未定义的函数调用  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=139636)

--  作者:lgj716330
--  发布时间:2019/8/17 23:37:00
--  [求助]表达式包含未定义的函数调用
错误提示:表达式包含未定义的函数调用 Average()。

Dim dt As DataTable = DataTables("统计表")
Dim filter1,filter2 As String
filter1 = "年份 = " & nf1 & " And (" & filter & ")" 
filter2 = "年份 = " & nf2 & " And (" & filter & ")" 
Dim lj1 As Double = dt.Compute("Average([工时])",filter1) 
Dim lj2 As Double = dt.Compute("Average([工时])",filter2)
[此贴子已经被作者于2019/8/17 23:37:13编辑过]

--  作者:y2287958
--  发布时间:2019/8/18 14:02:00
--  
Avg(工时)