Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

choose the first non-null value

Hello

I got three variables

v1, v2, and v3

i want to use these inside an expression but as follows:

if($(v1) is not null null then $(v1)

if($(v1) is null then if $(v2) is null then $(v3) else $(v2)

is there a way or a function that chooses the first non null value ?

the priority is for V1, then V2 and finally V3

I can walk on water when it freezes
3 Replies
Anil_Babu_Samineni

May be this?

1) If($(v1) <> '0' or $(v1) <> ' ' or $(v1) <> '-', $(v1))

2) If(IsNull($(v1)), If(IsNull($(v2)), $(v3), $(v2)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
antoniotiman
Master III
Master III

Maybe

Alt(V1,V2,V3)

Regards,

Antonio

Anonymous
Not applicable

Hi,

Maybe this:

     If(not IsNull($(v1)), $(v1),

          if(IsNull($(v1)), if(IsNull($(v2)),$(v3),$(v2)

               )

          )