---
url: /process-functions/cube-create.md
description: Creates a cube within a model.
---

# cube.create

Creates a cube within a model.

```js
cube.create(cubeName, ...dimensions)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `cubeName` | `string` | The new cube's name. |
| `dimensions` | `string` | The names of the dimensions that make up the cube, at least two. The last one must be a measures dimension. The order you give becomes the cube's dimension order. |

## Returns

An empty string when it succeeds, or a message starting with `"Error:"` when it fails, such as when the cube already exists or a dimension can't be found.

## Examples

```js
cube.create("General Ledger", "Scenario", "Time", "Department", "Account", "Project", "Measures General Ledger");
```
