Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I assign a 'n/a' text value to NULLs in my data set?

I created a mapping table as follows:

Grade Description

A: Great
B: Good
C: Bad

However, I also have Grades such as 'D' and 'E'. Using this mapping table returns NULLs when I create a table with the results. Is there a way in the script I can have non-mapped Grades to say 'n/a'? I'm thinking of an IF function but maybe there is a better way. Thanks!

1 Reply
johnw
Champion III
Champion III

There's an optional third parameter for applymap() that lets you specify a default value:

applymap('Grade Map',Grade,'n/a')