Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Flag for null values

Good Day guys,

Please assist, im trying to create a flag for null values on the Purchase Order Number field.

I created the flag but its bringing all values as 0 (Null and not null values). Now i cant filter on the null ones. Attached below is the Script and the results that i get after loading. Null and not null flag is the same. Thank you

Script.png

Nul and Not null.png

14 Replies
Not applicable
Author

Hi Sunny,

instead of going field wise null handling try to use null handling of All Loaded Field in single Query (it is possible to handle null of all fields by single Query)

try to use this :

Map_ProductId_Null:

MAPPING LOAD

NULL(),

'0'

Autogenerate 1;

Map ProductId using Map_ProductId_Null;

Map_Product_Null:

MAPPING LOAD

NULL(),

'UNKNOWN'

Autogenerate 1;

Map ProductCategory,ProductName using Map_Product_Null;

Test1:

LOAD ProductId,

     ProductCategory,

     ProductName

FROM

D:\rnd\Test123.xlsx

(ooxml, embedded labels, table is Sheet1);

Regards

ajay Kushwaha

Mahamed_Qlik
Specialist
Specialist

Hi Gaonyadiwe,

You can try this too:

if(IsNull([Purchase Order Number]),1,0) as NullFlag

-Mahamed

Anonymous
Not applicable
Author

I think it should work, I tried in past and it was working well

I was just sharing alternate or workaround not having any intention to make it complicate

Mahamed_Qlik
Specialist
Specialist

Or you can try this:

NullAsValue [Purchase Order Number];

Set NullValue = '1' ;

Then Load your data...

Regards,

Mahamed

Anonymous
Not applicable
Author

Thanks a lot Sunny T, it works perfect