Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

replace null values with "missing"

Hi,

I have to show "missing" instead of null in the fields with null values in the final table obtained after concatenation.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This is best done at reload time with script like this:

LOAD ....

     If(IsNull(MyField), 'MISSING', MyField) As MyField,

     ....

(You can use If(Len(MyField) = 0, .. ) instead - it will detect nulls and empty strings).

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This is best done at reload time with script like this:

LOAD ....

     If(IsNull(MyField), 'MISSING', MyField) As MyField,

     ....

(You can use If(Len(MyField) = 0, .. ) instead - it will detect nulls and empty strings).

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

Try like:

NullAsValue FieldA;

Set NullValue = 'Missing' ;

Load FieldA,B from <>;

amit_saini
Master III
Master III

Hi Abhinav,

Please use this script:

If(IsNull(Your_Field), 'missing', Your_Field) as Field,

Thanks,

AS

sunilkumarqv
Specialist II
Specialist II

Hi Abhinav,


These helps me!. hope it will apply you to.

MissingMap:

MAPPING LOAD

null(), 'MISSING!' AutoGenerate 1;


MAP FieldName USING MissingMap;

//The mapping will be applied when the field value is created. So how do we apply the map to an already existing table? //We make a copy of the table. That will cause the latest mapping to be applied

NewTable:

NoConcatenate   // This is important! We want a new table!

LOAD * RESIDENT Orders;

DROP TABLE Orders;  //



Not applicable
Author

Hi Abhinav,

Apart from all the options suggested above , you can do it in front end by going to Properties -- Presentation tab and giving the Null and Missing symbols as desired.

But of course doing it from the script is always the best option. 🙂

Anonymous
Not applicable
Author

Thanks a lot everyone.It worked.

Not applicable
Author

Hi Abhinav,

I would suggest you to implement in the chart.

For ex:- straight table ( see the image attached) instead of the word 'missing' you can give your own word.

Hope this helps!

--

Vinoth