NQL as()
as()
関数を使用すると、NQL クエリの出力をフォーマット済みの形式で表示できます。これはメトリクスに特定のフォーマット情報を割り当てることによって行います。 Nexthinkインターフェースは、指定された単位でデータを表示します。 as()
関数はリストおよびソート句でサポートされています。
例:
devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code = USD)

以下のフォーマットオプションを使用してください:
フォーマッター
単位
例クエリ
エネルギー
Wh
kWh
MWh
GWh
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 )
重量
g
kg
t
kt
devices
| where hardware.type = laptop or hardware.type = Desktop
| summarize no_of_devices = (count()^1) * 422.5
| リスト no_of_devices.as( format = weight )
通貨
追加のcode
パラメータを使用して通貨を指定してください。
CAD
: CA$
CHF
: CHF
GBP
: £
EUR
: €
USD
: $
devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code = USD)
devices
| summarize total_cost = count() * 2000
| list total_cost.as(format = currency, code = EUR)
パーセント
% パーセンテージを計算するために、システムはその値に100を掛けて%記号を付けます。 たとえば、0.47の値は47%に変換されます。
デバイス
| with execution.crashes
| summarize impacted_devices = countif(operating_system.name == "Windows 10 Pro 22H2 (66 bits)")/count()
| リスト impacted_devices.as(format = percent)
ビットレート
bps
Kbps
Mbps
Gbps
connectivity.events during past 30d
| where primary_physical_adapter.type == WiFi
| where wifi.signal_strength.avg <= -67 or (context.device_platform == "macOS" and wifi.noise_level.avg >= -80)
| summarize average_receive_rate = wifi.receive_rate.avg()
| list average_receive_rate.as(format = bitrate)
Last updated
Was this helpful?