> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Cubes, Fact Tables, and Measures

> Bind fact tables, maintain dimension relationships, create measures, and preview exposed fields.

The current cube editor is **Cube** in the model workspace. A semantic model can contain multiple cubes. Each cube has its own fact table, measures, dimensions, and calculated members.

## Configure a relational cube

1. Click **New cube** or select an existing cube.
2. In relationship mapping, choose the fact table. It is the starting point for query aggregation.
3. Add a measure and enter its name, display name, source column, data type, aggregation such as sum, and format string. Each cube needs at least one measure.
4. Add dimensions and set the fact-table foreign key, dimension table, and primary key.
5. In **Semantic design**, review the measure and dimension fields.
6. Use the usage preview to review exposed fields, then open the Query lab for a real query.

## Calculated members

In **Calculations**, add a calculated member with a name, dimension (usually the Measures dimension), and expression. An empty expression is a model quality error. Test complex expressions in the Query lab first.

## XMLA cubes

After importing an XMLA cube, remote bindings for the cube, measures, and dimensions come from the structure information. You can edit display names, visibility, variable defaults, and metric bindings in the XMLA workspace. If an object is missing, refresh the preview and confirm the remote model before changing anything.

## Before publishing

* The fact table and every relationship key exist.
* There is at least one measure, and each measure has a source column or a valid remote binding.
* Every dimension has at least one hierarchy and level.
* Every calculated member has an expression.
* Model quality has no blocking errors and the query probe succeeds in **Run and cache**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.