Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
NWQ
Partner - Contributor
Partner - Contributor

Expression Builder to catch Phone Number and Gender

Hi, 

Would like to know how to i write an expression in tMap component to capture 2 scenario.

1. Phone number column is not in number

2. Gender column is not in Male and Female.

Thank you!

Any additional information to use expression builder for Data Quality module will be great and appreciate that!

Labels (1)
1 Solution

Accepted Solutions
Shicong_Hong
Support
Support

Hello 

1. Phone number column is not in number

You can use the built-in function Mathematical.NUM(String s) to validate the number column,  returns 1 if it is a numeric data type, otherwise, returns 0; 

for example, add the following expression in the filter expression field.

Mathematical.NUM(row1.columnName)==1

2. Gender column is not in Male and Female.

Use the expression:

row1.columName.equals("Male")&&row1.columName.equals("Female")

Regards

Shicong

View solution in original post

2 Replies
Shicong_Hong
Support
Support

Hello 

1. Phone number column is not in number

You can use the built-in function Mathematical.NUM(String s) to validate the number column,  returns 1 if it is a numeric data type, otherwise, returns 0; 

for example, add the following expression in the filter expression field.

Mathematical.NUM(row1.columnName)==1

2. Gender column is not in Male and Female.

Use the expression:

row1.columName.equals("Male")&&row1.columName.equals("Female")

Regards

Shicong

NWQ
Partner - Contributor
Partner - Contributor
Author

Thanks it work!