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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script to rename Nulls as 'Errors'

Hi Guys

I have loaded a few excel sheets into qlikview, some of the columns have no data for particular customers ( after reading other posts etc I know that nulls() are mad complicated!!)

Just wondering is there a simple way to "rename" and blank field in ths script. Basically I wish to build a table where I can search by the Nulls so I know what data fields have gaps

I have tried the following to no avail perhaps someone can heeeellllppp

Thanks

A

if([REPAYMENT FREQUENCY]= '','Error',[REPAYMENT FREQUENCY]) as [REPAYMENT FREQUENCY]

if([REPAYMENT FREQUENCY]= null(),'Error',[REPAYMENT FREQUENCY]) as [REPAYMENT FREQUENCY]

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Try this

IF(ISNULL([REPAYMENT FREQUENCY]) = -1, 'Error', [REPAYMENT FREQUENCY]) AS [REPAYMENT FREQUENCY]

The function ISNULL(YOUR_FIELD) return -1 when the value of this field is NULL.

View solution in original post

3 Replies
Not applicable
Author

Hi,

Try this

IF(ISNULL([REPAYMENT FREQUENCY]) = -1, 'Error', [REPAYMENT FREQUENCY]) AS [REPAYMENT FREQUENCY]

The function ISNULL(YOUR_FIELD) return -1 when the value of this field is NULL.

Not applicable
Author

ecorrea

Thanks so much , works perfectly on that field.

Is it possible to put that as a rule on all the sheets , so anywhere on any field there is a null it says Error , I dont fancy having to write it out for all columns

Anne

Not applicable
Author

Hi,

You can define in your script this rule or set this in your objects (Properties/Presentation/Null Symbol or Missing Symbol), but in this case you need to set one by one.