#### Pivot Calculated formula: SUM(Field1)/AVG(Field2)

``````Month | Product | Amount | Interval in sec
------------------------------------------
05-'12| Prod A  | 10     | 5
05-'12| Prod A  | 3      | 5
05-'12| Prod B  | 4      | 5
05-'12| Prod C  | 13     | 5
05-'12| Prod C  | 5      | 5
``````

``````Month | Product | SUM of Amount | AVG of Interval in sec
--------------------------------------------------------
05-'12| Prod A  | 13            | 5
05-'12| Prod B  | 4             | 5
05-'12| Prod C  | 18            | 5
``````

``````Month | Product | SUM of Amount | AVG of Interval in sec | Amount per sec
-------------------------------------------------------------------------
05-'12| Prod A  | 13            | 5                      | 1.3
05-'12| Prod B  | 4             | 5                      | 0.8
05-'12| Prod C  | 18            | 5                      | 1.8
``````

``````Month | Product | SUM of Amount | AVG of Interval in sec | Amount per sec
-------------------------------------------------------------------------
05-'12| Prod A  | 13            | 5                      | 2.6
05-'12| Prod B  | 4             | 5                      | 0.8
05-'12| Prod C  | 18            | 5                      | 3.6
``````

3 个回复

`SUM(FIELD_TO_AVERAGE)/SUM(COUNT)`

`=GETPIVOTDATA("Sum of Amount",\$A\$3,"Product","A")/GETPIVOTDATA("Average of Interval",\$A\$3,"Product","A")`

``````K5=GETPIVOTDATA("Sum of Amount",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod A")/GETPIVOTDATA("Average of Interval",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod A")
K6=GETPIVOTDATA("Sum of Amount",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod B")/GETPIVOTDATA("Average of Interval",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod B")
K7=GETPIVOTDATA("Sum of Amount",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod C")/GETPIVOTDATA("Average of Interval",\$H\$2,"Month",DATE(2012,5,1),"Product","Prod C")
``````

1 Pivot计算公式：cont（Field1）/ AVG（Field2）

3 Oracle查询，其中field1 = field2和field2 = field1

4 如果Field1是特定的，则Field1等于Field2。

PHP / mysql我该怎么做？ 任何帮助都非常感谢。 数据库包含2个字段。 ID INT AUTO_INCREMENT Field1 Var 6 nul Field2 Var 6 nul如果我在field1中输入1A2345，则field2应等于PO1A23如果我在field1中输入2 ...

2013-11-25 23:22:36 1 97   php/ mysql
5 根据field1选择自动建议field2

JS对我来说还是有点不自然。 我可以很好地阅读它，但是写它却很少有机会做。 我有这个表格（简体） 对于#co输入，我可以自动完成工作，但是我可以使用一些指导来使下一步工作。 我需要根据#co选择自动为#contact输入建议名称。 我的JS目前看起来是这样的 如 ...

6 CodeIgniter其中值IN（Field1，Field2）

7 复制field2时更新field1

9 访问报告-如果field2等于field3，则显示field1