# Funzioni logiche

In questa sezione vengono descritte le funzioni di gestione delle operazioni logiche. Tutte le funzioni possono essere utilizzate sia nello script di caricamento che nelle espressioni grafiche.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/LogicalFunctions/logical-functions.htm)

#### IsNum

Restituisce -1 (True) se l'espressione può essere interpretata come numero, altrimenti restituisce 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

Restituisce -1 (True) se l’espressione presenta una rappresentazione di testo, altrimenti restituisce 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 informaticaEntrambe IsNum e IsText restituiscono 0 se l'espressione è NULL.

Esempio:

Nel seguente esempio viene caricata una tabella inline contenente testo e valori numerici misti e vengono aggiunti due campi per verificare se il valore è, rispettivamente, un valore numerico o un valore di testo.

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

```
 
```

La tabella risultante avrà l'aspetto seguente:

Example 1

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