# NQL sumif()

The `sumif()` command summarizes values from the rows that match specified criteria. It accepts extra arguments, the conditions that determine which rows to include.

{% code overflow="wrap" lineNumbers="true" %}

```
devices during past 24h
| include web.page_views during past 24h
| where application.name == "Confluence"
| compute total_cnt = page_view.number_of_page_views.sumif(page_view.experience_level == frustrating)
| sort total_cnt desc
| limit 10
```

{% endcode %}

<table data-full-width="true"><thead><tr><th width="225">Name</th><th width="184">Entity</th><th width="290">Hardware → Device model</th><th width="271">Hardware → Device type</th><th width="404">Operating system -> Name</th><th>Total cnt</th></tr></thead><tbody><tr><td>NXDOCS-1704355664</td><td>Switzerland</td><td>MacBookPro18,3</td><td>laptop</td><td>macOS Sonoma 14.2.1 (ARM 64 bits)</td><td>7</td></tr><tr><td>NXDOCS-1704355669</td><td>Spain</td><td>ThinkPad P1 Gen 4i</td><td>laptop</td><td>Windows 11 Enterprise 22H2 (64 bits)</td><td>6</td></tr><tr><td>NXDOCS-1704355676</td><td>India</td><td>HP ZBook Power G7 Mobile Workstation</td><td>laptop</td><td>Windows 11 Enterprise 22H2 (64 bits)</td><td>6</td></tr><tr><td>NXDOCS-1704355687</td><td>Spain</td><td>ThinkPad T14s Gen 3</td><td>laptop</td><td>Windows 11 Pro 22H2 (64 bits)</td><td>5</td></tr><tr><td>NXDOCS-1704355691</td><td>India</td><td>MacBookPro16,1</td><td>laptop</td><td>macOS Ventura 13.6.3 (64 bits)</td><td>5</td></tr><tr><td>NXDOCS-1704355695</td><td>United States</td><td>MacBookPro18,3</td><td>laptop</td><td>macOS Sonoma 14.2.1 (ARM 64 bits)</td><td>5</td></tr><tr><td>NXDOCS-1704355714</td><td>United Kingdom</td><td>MacBookPro18,2</td><td>laptop</td><td>macOS Sonoma 14.2.1 (ARM 64 bits)</td><td>4</td></tr><tr><td>NXDOCS-1704355719</td><td>Switzerland</td><td>MacBookPro18,1</td><td>laptop</td><td>macOS Ventura 13.6.3 (ARM 64 bits)</td><td>4</td></tr><tr><td>NXDOCS-1704355725</td><td>India</td><td>ThinkPad T480</td><td>laptop</td><td>Windows 10 Pro 22H2 (64 bits)</td><td>4</td></tr><tr><td>NXDOCS-1704355730</td><td>United States</td><td>MacBookPro18,1</td><td>laptop</td><td>macOS Sonoma 14.0.0 (ARM 64 bits)</td><td>3</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-functions/nql-sumif.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
