# DashboardAnalytics.profile Method

> DashboardAnalytics.profile method in the Node.js TypeScript API: Profiles up to 250,000 cells per source. Call after before-events complete.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > DashboardAnalytics > DashboardAnalytics.profile Method
- **641 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/profile-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/profile-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/profile-method/llms-full.txt

---

Profiles up to 250,000 cells per source. Call after before-events complete; returns detached metadata and diagnostics.

Owner: [DashboardAnalytics](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```typescript
profile(sourceId: string): AnalyticsProfile
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `sourceId` | `string` | No | Value matching sourceId's declared type and the owning object's validation rules. |

### Return Value

`AnalyticsProfile`.

### Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

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

function applyDashboardAnalyticsProfile(control: ServerSheetControl) {
    const book = control.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 dashboardAnalytics = book.analytics;

    const result = dashboardAnalytics.profile('sales');
    return result;
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [DashboardAnalytics Class](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)
- [AnalyticsProfile Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticsprofile/llms-full.txt)

---

## Nearby

- **Previous:** [DashboardAnalytics.data Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/data-method/llms-full.txt)
- **Next:** [DashboardAnalytics.query Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/dashboardanalytics/query-method/llms-full.txt)
