> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# dimensionSetTotals()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/execution/base/dimension.ts

Creates a new dimension which has same items as the provided dimension but different totals.

**Signature:**

```typescript
export declare function dimensionSetTotals(dim: IDimension, totals?: ITotal[]): IDimension;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| dim | [IDimension](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idimension/index.md) | dimension to inherit item identifiers from |
| totals | [ITotal](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.itotal/index.md)[] | _(Optional)_ totals to have in the new dimension |

**Returns:**

[IDimension](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idimension/index.md)

new dimension
