# AnalyticsResult Interface

> AnalyticsResult interface in the TX Sheet Control TypeScript API for the browser: Detached grouped rows and the number of input rows that passed filters.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > AnalyticsResult Interface
- **607 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/llms-full.txt

---

Detached grouped rows and the number of input rows that passed filters.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

Type-only declaration; it is not a JavaScript runtime constructor.

### Members

#### Properties

| Property | Description |
|---|---|
| [columns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/columns-property/llms-full.txt) | The columns value of AnalyticsResult. |
| [matchedRows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/matchedrows-property/llms-full.txt) | The matchedRows value of AnalyticsResult. |
| [rows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/rows-property/llms-full.txt) | The rows value of AnalyticsResult. |

### Examples

Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';

async function createAnalyticsResultReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.range('A1:B5').setValues([
        ['Region', 'Revenue'],
        ['North', 42000],
        ['South', 38500],
        ['East', 31200],
        ['West', 44900],
    ]);

    book.analytics.setSource({
        id: 'sales',
        name: 'Regional sales',
        sheetId: sheet.id,
        range: 'A1:B5',
        hasHeaderRow: true,
    });

    const result = await book.analytics.query({
        sourceId: 'sales',
        dimensions: ['Region'],
        measures: [{ field: 'Revenue', aggregation: 'SUM', alias: 'Revenue' }],
    });

    return result;
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)

---

## In This Section

- [AnalyticsResult.columns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/columns-property/llms-full.txt): AnalyticsResult.columns property in the TX Sheet Control TypeScript API for the browser, with its type string[] and a TypeScript example.
- [AnalyticsResult.matchedRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/matchedrows-property/llms-full.txt): AnalyticsResult.matchedRows property in the TX Sheet Control TypeScript API for the browser, with its type number and a TypeScript example.
- [AnalyticsResult.rows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/rows-property/llms-full.txt): AnalyticsResult.rows property in the TX Sheet Control TypeScript API for the browser, with its type Record<string, AnalyticsValue>[] and a TypeScript example.

---

## Nearby

- **Previous:** [AnalyticsRelationshipSuggestion.targetSourceId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsrelationshipsuggestion/targetsourceid-property/llms-full.txt)
- **Next:** [AnalyticsResult.columns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/analyticsresult/columns-property/llms-full.txt)
