# Fonctions logiques

Cette section décrit les fonctions de gestion des opérations logiques. Les fonctions s'utilisent toutes aussi bien dans le script de chargement que dans les expressions de graphique.

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

#### IsNum

Renvoie -1 (True) si l'expression peut être interprétée comme un nombre ; sinon, renvoie 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

Renvoie -1 (True) si l'expression a une représentation textuelle ; sinon, renvoie 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 )

Note InformationsLes fonctions IsNum et IsText renvoient 0 si l'expression correspond à NULL.

L'exemple suivant charge une table intégrée comportant à la fois des valeurs textuelles et des valeurs numériques, et ajoute deux champs destinés à vérifier le type de chaque valeur (numérique ou textuelle).

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

```
 
```

La table résultante a l'aspect suivant :

Example 1

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