Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
karthick01
Contributor III
Contributor III

How to interpret a value as Null from Database?

Hi,

Using NullInterpret, we can interpret any value as a null value. Example, '+' can be interpreted as a null value using the NullInterpret variable. But by definition of Nullinterpret,

"The defined symbol will when it occurs in a text file or an inline statement be interpreted as NULL."

So, if I want to interpret something ('+') from the database, how can we do that? is there any variable similar to Nullinterpret or we need to handle that logically using If statement?

Thanks

14 Replies
karthick01
Contributor III
Contributor III
Author

Thank you so much Stefan

johanlindell
Partner - Creator II
Partner - Creator II

There is a function to check if a value is a number, IsNum. You can use that:

LOAD Year,

      If (IsNum(Amount), Amount, Null ()) as Amount,

xxx

karthick01
Contributor III
Contributor III
Author

Yes, this logic also works. Thanks Johan

marcioarruda
Creator III
Creator III

Try this Karthick Sudalaiyandi:

On load the script do

If(FindOneOf(Amount,'+-><') > 0 , 'NULL',Amount) AS Amount

In the red part put the possible characters that will be considered null.

Digvijay_Singh

Sweet!!! Thanks as always!!!!