If you haven't read it yet, review this post: Add Grouping to your Online Database Views. In addition to being able to organize your records into groups, you can also define Group Subtotals, Grand Totals and other aggregate functions! Aggregate functions are simply a quick way to include real-time calculations such as Sum, Min, Max, Average and Count to your Custom Online Database View. When you add aggregates to a custom view that also includes Grouping, you are able to define both Subtotals by Group and Grand Totals at the bottom of your View.
To get started defining aggregate functions within your online database views, you will want to access the appropriate custom view inside the GroveSite Database Editor. From there, you should see toward the bottom of the screen a section for Aggregate Functions.
In the field name drop down you will notice that only the numeric fields within your database will be listed. In the function dropdown you have the choice between sum, min, max, and average.
You then have the choice as to whether you want the aggregate function to be shown within the subtotal, the grand total, or both. In the image below, we have defined a Sum of Purchase Price to be shown in the Grand Total. Notice that there is only one Grand Total for the Purchase Price, even though there are two groups shown.
In the image below, we have defined a Max of Current Price to be shown in the Subtotal. Note that there is a Max for Current Price in the Subtotal for each group and there is no Grand Total at the bottom.
In the image below, we have defined a Sum of Purchase Price to be shown in both the Subtotal and the Grand Total, and the Max of Current Price to be shown in the Subtotal. Notice that there is a Subtotal for each of the two groups' Sum Purchase Price in addition to a Grand Total for both of the groups' Purchase Price.
Remember that from within any view you have the option to "Open in Excel". This allows for extremely clean looking database reports -- and they include your defined groups and aggregates! Ready to get started? Sign in and start editing your custom views to include groups and aggregates! Don't have a GroveSite Online Database yet? Request a free trial! As always, please contact us with any additional questions.