NQL as()

The as() function allows you to display the output from NQL queries in a formatted manner by assigning specific formatting information to the metrics. The Nexthink interface displays the data with the unit specified.​ The as() function is supported in the list and sort clauses.

Example:

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

Use the following formatting options:

Formatter
Unit
Example query

energy

Wh

kWh

MWh

GWh

weight

g

kg

t

kt

currency

Specify the currency using the additional code parameter.

CAD: CA$

CHF: CHF

GBP: £ EUR: €

USD: $

percent

% To compute the percentage, the system multiplies the value by 100 and appends the % symbol. For example, a value of 0.47 is converted to 47%.

bitrate

bps

Kbps

Mbps

Gbps

Last updated

Was this helpful?