# 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 e nas expressões de gráfico.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/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/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/LogicalFunctions/logical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/LogicalFunctions/logical-functions.htm)IsNum( expr )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/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/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/LogicalFunctions/logical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/LogicalFunctions/logical-functions.htm)IsText( expr )

Nota informativaTanto IsNum quanto 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:

Example 1

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