# Cross-Model Calculation > Write AQL dimensions and measures that reference fields from related models, so calculations like quantity × price can pull data across your whole dataset. :::tip Knowledge Checkpoint A grasp of these concepts will help you understand this documentation better: - [Cross-Model Reference](/as-code/aql/learn/cross-model) ::: ## Overview In most analytic setups, data are organized across multiple [models](/reference/aml/model). Thus, it is often necessary to perform calculations that involve data from multiple models. For example, in an e-commerce dataset, you may want to make calculations that involves data from orders, users, and products models. In AQL, this is called **cross-model calculation**. In this guide, you will learn how to perform cross-model calculation in AQL. If you want to learn more about the concepts behind cross-model calculation, please refer to its [reference](/as-code/aql/learn/cross-model) page. ## Prerequisites This guide assumes that you have a basic understanding of the following concepts: - How to [define data models](/reference/aml/model) - How to [define data sets](/reference/aml/dataset) - How to [define relationships](/reference/aml/relationship) ## Setup To start, visit the following AQL playground ([link](https://go.holistics.io/U6L8M)) and examine the `ecommerce` dataset. This dataset contains 4 models: `users`, `products`, `orders`, and `order_items`. The relationships between these models are defined as follows: