These cookies provide us with information on how our websites are being used, to help us improve the quality and relevance of content we place on them. Additionally, they also allow us to show you embedded videos and remember your preferences and actions, so that the websites do not bother you with the same request repeatedly (e.g. filling a form to download a PDF file and provide feedback about such actions to our affiliated entities).
You are viewing our older product's guide. Click here for the documentation of GoodData Cloud, our latest and most advanced product.
Aggregation Functions
Aggregation refers to the computation of a function across a defined set of facts.
Facts are raw numerical data pulled from the source, which may be of limited value on their own. Examples of facts might include:
- Revenue earned from a sale
- Cost of some item purchased
- Hours worked by one employee
- Number of items shipped in a delivery
Facts are stored with contextual data in a raw form in the datastore. To derive insights from fact data, you must aggregate facts into metrics.
For example, you might sum all the sales revenue data (the Sales Revenue fact) for the entire country. Or you might slice this aggregation by a specific region of the country:
These aggregations, called metrics, are referenced by name in the Data Catalog of the Analytical Designer under the Analyze tab and you can use them in your insights. Metrics can also be referenced within the definitions of other metrics.
Use the following aggregations to form metrics:
For more information, see GoodData Glossary.
Metrics contain other interesting features. In the previous simple example, the WHERE
clause includes information that defines the range of facts across which the sum is computed. You can also apply any of the following types of operations within a metric definition: