Storing calculation results


Storing calculation results carries the same tradeoffs as indexing any other field: It speeds finding records but also increases your database's size. FileMaker offers a decent compromise, however, by giving you the option of only performing a calculation (and, so, storing the result) when it's needed, such as when you're printing or browsing that particular field and record.

Unless you tell it otherwise, FileMaker automatically stores calculations except those from summary fields, as well as those that depend on another calculation already marked as unstored.

To store calculation results

1.

First create a calculation field and build a formula for it. (See To define a calculation field on page 119.) If you already have a calculation field defined, choose File > Define > Database ( in Windows, on the Mac).

2.

When the Define Database dialog box appears, double-click on the name of the calculation field whose results you want to store or index. The Specify Calculation dialog box appears with the formula in the center box. Click the Storage Options button.

3.

The Storage Options dialog box appears (Figure 9.35). To keep a result from being stored, select Do not store calculation resultsrecalculate when needed.

Figure 9.35. Use the checkbox in the Storage Options dialog box to control whether to store a calculation result or calculate it only when needed.


4.

Click OK. When the Define Database dialog box reappears, click OK to close the dialog box.

To define a summary field

1.

Choose File > Define > Database ( in Windows, on the Mac).

2.

When the Define Database dialog box appears, type into the Field Name text box the name of your summary field. Select Summary from the Type drop-down menu. Click the Options button (Figure 9.36).

Figure 9.36. To define a Summary field, click that choice in the Type area of the Define Database dialog box, then click Create.


3.

When the Options for Summary Field dialog box appears, choose which type of summary you want performed from the left-hand list, and select which field you want summarized from the scrolling list in the center (Figure 9.37, Table 9.7). You can also modify several of the summary types by selecting the checkbox just below the scrolling list, whose function varies in response to which type you've chosen. See Table 9.7, Summary Field Types.

Figure 9.37. Use the Options for Summary Field dialog box to select a summary action. The Weighted average checkbox modifies many of the left-hand options.


Table 9.7. Summary Field Types(see Figure 9.37)

NAME

DEFINITION

OPTION VIA CHECKBOX

TO FINE TUNE OPTION:

Total of

Totals values in selected field

Running total

 

Average of

Averages values in selected field

Weighted average

Pick a field for averaged values

Count of

Counts how many records contain a value for field

Running total

 

Minimum

Finds lowest number, or earliest time or date, for field

none

 

Maximum

Finds highest number, or latest time or date, for field

none

 

Standard Deviation of

Calculates standard deviation from mean of values in field

by population

 

Fraction of Total of

Calculates the ratio of field's value to total for all values in field

Subtotaled

Pick a field for subtotaled values


4.

Click OK. When the Define Database dialog box reappears, click OK to close the dialog box.

Tip

  • Formatting summary fields varies depending on which summary part you use to display them. See Creating Layouts on page 143.




FileMaker Pro 8 for Windows and Macintosh(c) Visual Quickstart Guide
FileMaker Pro 8 for Windows & Macintosh
ISBN: 032139674X
EAN: 2147483647
Year: 2006
Pages: 184
Authors: Nolan Hester

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net