QuickBase Resources - average
http://quickbase.intuit.com/developer/taxonomy/term/441/0
enHow can I compare the current days elapsed for all open projects with the average completion time for all closed projects within that zip code? I want my report to display longer than average projects in red.
http://quickbase.intuit.com/developer/knowledge-base/how-can-i-compare-current-days-elapsed-all-open-projects-average-completion-time-all-closed-
<p>To achieve the results you are asking about, you will need to do the following:</p>
<p>1) Create a Zip Codes Table where each record is a Zip Code that will be assigned to your projects.<br />
2) In the Zip Codes table, designate a Zip Code (text) field as the key field. (Normally Record ID#)<br />
3) Create a relationship between the Zip Codes table and your Projects table where Zip Codes is the Master table. (When prompted, choose to use an existing field as the reference field in the Projects table. When asked which field to use, select the existing Zip Code field in the Projects table. If there is no such field you will have to create one.)<br />
4) Create a Formula duration field in the Projects table that calculates: Today() - [start date] Name this field “Project Days Elapsed”<br />
5) Create a Formula duration field in the Projects table that calculates [end date] - [start date] Name this field “Project Days Duration”<br />
6) Create a formula text field in the Projects table that calculates: If(IsNull([end date]),"Open", "Closed") Name this field “Status”<br />
7) Create a summary field in Zip Codes table named “Closed: Average Duration.” Use the summary function “Average” where the field being summarized is the field “Project Days Duration.” Use matching criteria summarizing only records where “Status” field is “Closed”<br />
8) Create a lookup field in the Projects table, selecting the “Closed: Average Duration” field from the Zip Codes table as the value field.<br />
9) Create a new report in the Projects table matching only records where the “Status” field is “Open.” Include the following columns in your report:<br />
- Status<br />
- Project Days Elapsed<br />
- Zip Code – Closed: Average Duration<br />
You should Sort and Group records by Zip Code, then sort by Days Elapsed.<br />
In the Additional Options section of the report builder, choose the Custom options selection. Check the “Row Colorization” box and enter this formula: If([Proj Days Elapsed]>[Zip Code - Closed: Average Duration], "red")</p>
<p>This report will display all open projects, grouped by Zip Code with columns showing the number of days elapsed since the project began, and the average number of days that it took for other projects to open and close within the same Zip Codes. Any open project in this report that has already been open longer than the average project will be displayed as a red row, highlighting the fact that it is taking longer than average to close this project.</p>
http://quickbase.intuit.com/developer/knowledge-base/how-can-i-compare-current-days-elapsed-all-open-projects-average-completion-time-all-closed-#commentsTablesaveragecolorelapsedhigh lighthigh-lighthighlightover dueprojectstimeviewzipcodeThu, 05 Feb 2009 22:16:27 +0000quickbase2180 at http://quickbase.intuit.com/developerHow come the totals and averages of a numeric formula field don't follow the formula?
http://quickbase.intuit.com/developer/knowledge-base/why-dont-totals-and-averages-numeric-formula-field-follow-formula
<p>The total value at the bottom of a column is the total of all values above it in the report. The same is true of the average value at the bottom of a report. The average value is the average of all the values in the column above it. The totals and averages at the bottom of a formula field do not necessarily relate to the totals and averages of fields that make up the formula in the way that the formula specifies. For example imagine ten rows and three fields. All cells have the value one in them. Totals are turned on for all three columns. Imagine that the third column is a formula field that divides the first column by the second column. The totals at the bottom of all three columns will display "10". However if you divide the total of column one by the total of column two you get the number one not the number 10! However in this case the average at the bottom of each column is one, which does follow the formula, but this is only a coincidence.</p>
<p>Here's another example:</p>
<p> 10 5 2<br />
100 1 100<br />
------------<br />
110 6 102 Totals<br />
55 3 51 Averages</p>
<p>In the above example the third column is a formula numeric field that divides the first column by the second column. Notice that in the Totals and Averages rows they represent the totals and averages of the numbers in the column above. However in the Totals row if you divide 110 by 6 you don't get 102 or even 51! And if you divide 55 by 3 in the Averages row you don't get 51 or even 102.</p>
http://quickbase.intuit.com/developer/knowledge-base/why-dont-totals-and-averages-numeric-formula-field-follow-formula#commentsField TypesFormulaNumericaveragefieldformulanumbernumerictotalsThu, 05 Feb 2009 22:16:10 +0000quickbase2073 at http://quickbase.intuit.com/developer