> ## Documentation Index
> Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://axiom.co/docs/feedback

```json
{
  "path": "/apl/scalar-functions/type-functions/isreal",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# isreal

> This page explains how to use the isreal function in APL.

Use the `isreal` function to determine whether a value is a real number. This function is helpful when you need to validate data before performing numeric operations. For example, you can use `isreal` to filter out invalid values which could otherwise disrupt aggregations or calculations.

You often use `isreal` in data cleaning pipelines, conditional logic, and when inspecting metrics like durations, latencies, or numeric identifiers. It’s especially useful when working with telemetry or log data that includes optional or incomplete numeric fields.

## For users of other query languages

If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.

<AccordionGroup>
  <Accordion title="Splunk SPL users">
    Splunk uses the `isnum` function to check whether a string represents a numeric value.

    <CodeGroup>
      ```sql Splunk example theme={null}
      ... | eval is_valid = if(isnum(duration), "yes", "no")
      ```

      ```kusto APL equivalent theme={null}
      ... | extend is_valid = iff(isreal(duration), 'yes', 'no')
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="ANSI SQL users">
    ANSI SQL doesn’t have a direct equivalent to `isreal`. You typically check for numeric values using `IS NOT NULL` and avoid known invalid markers manually. APL’s `isreal` abstracts this by directly checking if a value is a real number.

    <CodeGroup>
      ```sql SQL example theme={null}
      SELECT *, 
             CASE WHEN duration IS NOT NULL THEN 'yes' ELSE 'no' END AS is_valid
      FROM traces
      ```

      ```kusto APL equivalent theme={null}
      ['otel-demo-traces']
      | extend is_valid = iff(isreal(duration), 'yes', 'no')
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Usage

### Syntax

```kusto theme={null}
isreal(value)
```

### Parameters

| Name  | Type | Description                  |
| ----- | ---- | ---------------------------- |
| value | any  | The input value to evaluate. |

### Returns

Returns `true` if the input is a valid real number. Returns `false` for strings, nulls, or non-numeric types.

## Example

Use `isreal` to identify real number values.

**Query**

```kusto theme={null}
['sample-http-logs'] 
| extend is_real = isreal(123.11)
```

[Run in Playground](https://play.axiom.co/axiom-play-qf1k/query?initForm=%7B%22apl%22%3A%22%5B'sample-http-logs'%5D%20%7C%20extend%20is_real%20%3D%20isreal\(123.11\)%22%7D)

**Output**

| \_time               | is\_real |
| -------------------- | -------- |
| 2025-06-05T12:01:00Z | true     |

## List of related functions

* [isimei](/apl/scalar-functions/type-functions/isimei): Checks whether a value is a valid International Mobile Equipment Identity (IMEI) number.
* [ismap](/apl/scalar-functions/type-functions/ismap): Checks whether a value is of the `dynamic` type and represents a mapping.
* [iscc](/apl/scalar-functions/type-functions/iscc): Checks whether a value is a valid credit card (CC) number.
* [isstring](/apl/scalar-functions/type-functions/isstring): Checks whether a value is a string. Use this for scalar string validation.
* [isutf8](/apl/scalar-functions/type-functions/isutf8): Checks whether a value is a valid UTF-8 encoded sequence.
