Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

populate if null

Hi All,

I am hoping this is going to be simple.

I need something which will populate a field if null.

if([Level]='',  'Routine', [Level]) works as an expression but not in the script and I need it in the script so that it applies to the whole dashboard.

My only issue is that the field doesn't actually have any blank field but due to my keys it is not 1:1. This is when I would usually suppress the nulls but I am getting the right output with the blanks. I just need them populate.

I hope this made sense?

15 Replies
avinashelite

Try like this

if(len(trim([Level]))=0,  'Routine', [Level]) as [Level]

Anonymous
Not applicable
Author

This did not work

Peter_Cammaert
Partner - Champion III
Partner - Champion III

That should have worked for a column containing

  • NULL values
  • Empty strings (eg '')
  • Whitespace strings (eg ' ')

If it doesn't work then what does your field actually contain?

Anonymous
Not applicable
Author

Level.PNG

This is an example.

As mentioned, the actual field isn't blank, but when linked to other data it is. Such as below

levelex.PNG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You're not trying to stuff multiple LEvel values in a single table cell, are you? Like adding an expression like =Level to a Straight table?

Those NULL values aren't really there. They are caused by QlikView trying to put two different Level values in a single cell. And that won't work (implied Only() call)

Anonymous
Not applicable
Author

I am not.

I have 65 rows of an ID and only 31 of those have a level assigned to them, I want the blanks to be filled with 'Routine'

sasiparupudi1
Master III
Master III

May be try

if(IsNUll(Aggr(Max(Level),Severity,Urgency,Age)),'Routine',Level)

Anonymous
Not applicable
Author

Will this work in the script?

sasiparupudi1
Master III
Master III

no, use group by