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

# defTotals()

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

Gets totals from particular dimension in the provided execution definition.

**Signature:**

```typescript
export declare function defTotals(def: IExecutionDefinition, dimIdx: number): ITotal[];
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| def | [IExecutionDefinition](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iexecutiondefinition/index.md) | definition to get totals from |
| dimIdx | number | dimension index |

**Returns:**

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

empty list if no definition or dimension with the provided index not defined or if there are no  totals in the dimension
