+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "calculateFieldStats"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++

## calculateFieldStats() function

### calculateFieldStats() function

<b>Signature</b>

```typescript
export declare function calculateFieldStats(rows: LogRowModel[], extractor: RegExp): LogLabelStatsModel[];
```
<b>Import</b>

```typescript
import { calculateFieldStats } from '@grafana/data';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  rows | <code>LogRowModel[]</code> |  |
|  extractor | <code>RegExp</code> |  |

<b>Returns:</b>

`LogLabelStatsModel[]`

