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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
alan_grn
Creator II
Creator II

Select first non null value

Is there a function in Qlickview with will return the first non null value.

I am trying to do away with having to use multiple nested if statements.

2 Replies
Miguel_Angel_Baeyens

Hello Alan,

Depending on how is your data base sorted, you have two functions to get a non null value. One is

If(Not IsNull(Field), Field)
but I prefer to use
If(Len(Field) > 0, Field)
Is that what you are looking for?

Not applicable

The way to avoid null in your situation is to put distinct like this: firstsortedvalue( distinct ...

In my case working perfectly, hope it will help.