---
url: /process-functions/cube-set.md
description: Sets the value at an intersection of a cube.
---

# cube.set

Sets the value at an intersection of a cube.

```js
cube.set(value, cubeName, ...elements)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `value` | `number \| string` | The value to write. |
| `cubeName` | `string` | The cube's name. |
| `elements` | `string` | One element per dimension, in the cube's dimension order. Numbers can only be written to leaf elements; text can also be written to consolidated elements. |

## Returns

The value that was written, or a message starting with `"Error:"` when it fails.

## Examples

```js
cube.set(100, "General Ledger", "Actual", "2014", "600010", "100 - Finance", "No Project", "Amount");
```
