> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-functions/nql-as.md).

# NQL as()

`as()` 関数を使用すると、特定の書式情報を指標に割り当てることで、NQL クエリの出力をフォーマットされた形式で表示できます。 Nexthink インターフェースは、指定された単位でデータを表示します。`as()` 関数は [リスト](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-keywords/nql-list.md) および [ソート](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-keywords/nql-sort.md) 句でサポートされています。

例:

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

```
devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code  = USD)
```

{% endcode %}

<figure><img src="https://3549141153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLm8O7QKZDn6z806e7Sv%2Fuploads%2Fgit-blob-bc4497c8eed3f24a7c1a4ac122f1ef3160beedeb%2Fimage%20(205).png?alt=media" alt=""><figcaption></figcaption></figure>

次のフォーマットオプションを使用します:

<table data-full-width="true"><thead><tr><th width="113">フォーマッター</th><th width="180">単位</th><th>例のクエリ</th></tr></thead><tbody><tr><td>エネルギー</td><td><p>Wh</p><p>kWh</p><p>MWh</p><p>GWh</p></td><td><pre data-overflow="wrap" data-line-numbers><code>device_performance.events during past 1d
| where device.operating_system.platform = macos
| where hardware.type == laptop
| summarize estimated_energy = ((8 * 0.070) * device.count())
| list estimated_energy.as( format = energy )
</code></pre></td></tr><tr><td>重量</td><td><p>g</p><p>kg</p><p>t</p><p>kt</p></td><td><pre data-overflow="wrap" data-line-numbers><code>devices
| where hardware.type = laptop or hardware.type = desktop
| summarize no_of_devices = (count()^1) * 422.5
| list no_of_devices.as( format = weight )
</code></pre></td></tr><tr><td>通貨</td><td><p><code>code</code> パラメーターを使用して通貨を指定します。</p><p><code>CAD</code>: CA$</p><p><code>CHF</code>: CHF</p><p><code>GBP</code>: £<br><code>EUR</code>: €</p><p><code>USD</code>: $</p></td><td><pre data-overflow="wrap" data-line-numbers><code>devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code  = USD)
</code></pre><pre data-overflow="wrap" data-line-numbers><code>devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code  = EUR)
</code></pre></td></tr><tr><td>パーセント</td><td>%<br><br>パーセンテージを計算するには、システムが値を100倍して%記号を追加します。例えば、0.47の値は47%に変換されます。</td><td><pre data-overflow="wrap" data-line-numbers><code>devices
| with execution.crashes
| summarize impacted_devices = countif(operating_system.name == "Windows 10 Pro 22H2 (66 bits)")/count()
| list impacted_devices.as(format = percent)
</code></pre></td></tr><tr><td>ビットレート</td><td><p>bps</p><p>Kbps</p><p>Mbps</p><p>Gbps</p></td><td><pre data-overflow="wrap" data-line-numbers><code>connectivity.events during past 30d
| where primary_physical_adapter.type == wifi
| where wifi.signal_strength.avg &#x3C;= -67 or (context.device_platform == "macOD" and wifi.noise_level.avg >= -80)
| summarize average_receive_rate = wifi.receive_rate.avg()
| list average_receive_rate.as(format = bitrate)
</code></pre></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
