# Funções lógicas

Esta seção descreve as funções de manipulação de operações lógicas. Todas as funções podem ser usadas no script de carregamento de dados e em expressões de gráfico.

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)

#### IsNum

Retornará -1 (True) se a expressão for interpretada como um número; caso contrário, retornará 0 (False).

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)IsNum( expr )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)

#### IsText

Retornará -1 (True) se a expressão tiver uma representação de texto; caso contrário, retornará 0 (False).

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFunctions/logical-functions.htm)IsText( expr )

Nota informativaIsNum e IsText retornarão 0 se a expressão for NULL.

Exemplo:

O exemplo a seguir carrega uma tabela inline com uma combinação de texto e valores numéricos e adiciona dois campos para conferir se o valor é um valor numérico e, respectivamente, um valor de texto.

```
Load *, IsNum(Value), IsText(Value)
Inline [
Value
23
Green
Blue
12
33Red];
```

A tabela resultante tem a seguinte aparência:

Resulting table

| Value | IsNum(Value) | IsText(Value) |
| --- | --- | --- |
| 23 | -1 | 0 |
| Green | 0 | -1 |
| Blue | 0 | -1 |
| 12 | -1 | 0 |
| 33Red | 0 | -1 |