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

# newAttributeAreaSort()

- 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/sort.ts

Creates a new attribute area sort - sorting the result by aggregated measure values belonging to each attribute value included in the result.

**Signature:**

```typescript
export declare function newAttributeAreaSort(attributeOrId: IAttribute | string, sortDirection?: SortDirection, aggregation?: "sum"): IAttributeSortItem;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| attributeOrId | [IAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattribute/index.md) \| string | attribute to sort by |
| sortDirection | [SortDirection](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.sortdirection/index.md) | _(Optional)_ sorting direction |
| aggregation | "sum" | _(Optional)_ area sort aggregation function. only "sum" is supported at the moment. |

**Returns:**

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