Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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')