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

# pivotTableMenuForCapabilities()

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

Given analytical backend capabilities and the desired aggregations menu config.

**Signature:**

```typescript
export declare function pivotTableMenuForCapabilities(capabilities: IBackendCapabilities, desiredMenu?: IMenu): IMenu;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| capabilities | [IBackendCapabilities](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ibackendcapabilities/index.md) | Backend capabilities |
| desiredMenu | [IMenu](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.imenu/index.md) | _(Optional)_ Aggregation menu configuration desired by the client |

**Returns:**

[IMenu](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.imenu/index.md)

## Remarks

This function will correct the menu configuration so that it fits the capabilities.

The function will explicitly set the options regardless of what is the (current) default value of the option if it is not present in the menu. The backend capabilities are a hard stop for features.

Note: the [PivotTable()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-pivot/sdk-ui-pivot.pivottable/index.md) will use this function out of the box to ensure the effective menu configuration matches the backend capabilities. You don't need to use when creating a PivotTable.
