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

# bucketSetTotals()

- 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/buckets/index.ts

Gets a new bucket that 'inherits' all data from the provided bucket but has different totals.

**Signature:**

```typescript
export declare function bucketSetTotals(bucket: IBucket, totals?: ITotal[]): IBucket;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| bucket | [IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md) | bucket to work with |
| totals | [ITotal](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.itotal/index.md)[] | _(Optional)_ new totals to apply |

**Returns:**

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

new bucket

## Remarks

New totals will be used in the new bucket as-is, no merging with existing totals.
