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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
antoniotiman
Master III
Master III

Value NULL in set analysis?

Hi,

How can I set value NULL  in set analysis?

sum({<CostoVen={NULL}>} Sales)   [convert from sum(if(IsNull(CostoVen),Sales)]

Tanks You

32 Replies
antoniotiman
Master III
Master III
Author

Hi Simon,

really, the issue is from a behaviour of MySQL (AutoTrim).

Fields type char/varchar with blank (not Null) returns in QV  an Hex  '00'.

So, in QV this is Not Null, len > 0, and <> blank.

I have solved modifying the Scipt (query to MySQL).

Regards,

Antonio

sasiparupudi1
Master III
Master III

sum({<CostoVen={"$(=Null())"}>} Sales)   [convert from sum(if(IsNull(CostoVen),Sales)]

Not applicable

I have had many issues trying to use Null, IsNull, '', ' ' and other values to check for null, not null, anything without success.  What worked for mee was in the load script, I would check the length of the field in an If test and if it was 0, I would create a field in the load script with a zero value and do my set analysis comparing to the value of zero

example

If(Len(Trim([Purchase Nbr]))=0,0, 1)  as [NullPurchaseNbr]