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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transform a value field into Null

Hello,

I am working in a project in which some of the data source comes from CSV. When I load those data, there is some fields with strings values, written as 'NULL'. In QV this will not really count as null.

Is there way for me to convert those values to a proper NULL?

Is this condition script enough to achieve the goal?

If (FieldName= 'NULL', ' ', FieldName)

Thank you in advance!

Iuri

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Above should work after a small change:

If(FieldName = 'Null', Null(), FieldName) as FieldName

View solution in original post

14 Replies
sunny_talwar
MVP
MVP

Above should work after a small change:

If(FieldName = 'Null', Null(), FieldName) as FieldName

Not applicable
Author

Thank you for your help Sunny.

sunny_talwar
MVP
MVP

Not a problem

Not applicable
Author

Hi Sunny,

I just remembered something...

I have some tables with fields with 'NULL' (as string).

Is it possible to transform it into proper null automatically?

For example... if I declare a variable with the NUll()...

Is it possible to achieve it? Have you ever done that before?

Thanks in advance for your help.

Regards,

Iuri 

sunny_talwar
MVP
MVP

I have tried looking around, but havn't found a function which would replace all instances of 'NULL' (string) into actual NULL. I will continue looking, but right now, I am not sure if I have an answer for you

Not applicable
Author

Thank you very much for your effort.

To make it automatic replaced is not an urgent thing, I asked more for curiosity.  

sunny_talwar
MVP
MVP

May be we can seek help from experts on this topic -> hic‌, rwunderlich‌, swuehl‌, MRKachhiaIMP‌, jagan‌, MarcoWedel‌, bill.markham

MK_QSL
MVP
MVP

Check this video.. .not exactly the same you are looking for but may be useful..

Convert Null values using NullAsValue statement in QlikView - YouTube

sunny_talwar
MVP
MVP

Manish this video seems to be the opposite of what is needed.

NullAsValue would change Null() -> 'NULL' (for example)

but is it possible to go the other way?

'NULL' -> Null()?