Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
benoittanga
Contributor II
Contributor II

How complete empty values of a certain table?

Hi all Smiley Happy,

I have a question regarding "Null" values of one my table in QV. I'll try to explain as better as I can:

- My QV is charging a lot tables, and most of them contain empty values
- the main role of my app is to calculate KPI (completeness, accuracy) and so I have configure the NullInterpret in the beginning of my script, with these statements :

// AUTOMATIC CONVERT OF NULL INTO 'VIDE'
MissingTextMap:
MAPPING LOAD
null(), 'VIDE' AutoGenerate 1;

// AUTOMATIC CONVERT OF NULL INTO 'VIDE' WORD + ZERO NUMBER
MissingNumberMap:
MAPPING LOAD
null(), Dual('VIDE',0) AutoGenerate 1;

// HIDE PREFIX
Set hideprefix = '_';
set NullInterpret='';

 

My problem is: one of my table is storing results of a calculation, with the value "OK" (when the calculation is correct, obvously). I need to fill the others values by the word "NOK" but I don't know how to do it.

Theses "Null" Values are not filled with the word "VIDE" (as the others table) and so I don't really understand what is going on

 

Waiting for your feedback, and thanks for having read me

Ben

3 Replies
pradosh_thakur
Master II
Master II

Let's say that column which contain OK is "Flag"

You do the Following in the script 

if(len(trim(Flag))=0,'NOK',Flag) as Flag 

 

Learning never stops.
benoittanga
Contributor II
Contributor II
Author

Hi,

 

Okay, I'll try this! Thank you very much 🙂

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You don't show your MAP USING statement, that would be required. Also, if your null values are created indirectly by a join, you may have to pass through the table again to map.  See https://qlikviewcookbook.com/2013/01/filling-default-values-using-mapping/

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com