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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

is null function in qliksense

HI

i need  to create a column as

where ever A column data is null then i should be getting value of A and if A columns data is not null then i should get A columns data only.

For that i used isnul function but seems it is not bring data what i requeired

can anyone please help here

i used

if(IsNull(A),B,A)

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This worked for me

If((Trim(if(A='null','0'))) = '0',B, A)

View solution in original post

14 Replies
sunny_talwar
MVP
MVP

May be try this

If(Len(Trim(A)) = 0, B, A) as NewCol

Anonymous
Not applicable
Author

i tried this

If(Len(Trim(A)) = 0, B, A)

but i am not getting 0 value for len(trim(A)) as 0 , i am getting as null so i replaced 0 with null but still for

If(Len(Trim(A)) = 'null', B, A) , i am getting A value where i have value and null where i dont have A value but not B value

Anonymous
Not applicable
Author

A and B have datetime value

sunny_talwar
MVP
MVP

Len(Trim(A)) will give a value of 0 when A is null because Len of Null is 0. Does that make sense?

Anonymous
Not applicable
Author

yes, but pratically it is showing null only not brininging out 0

Anonymous
Not applicable
Author

yes, but pratically it is showing null only not brininging out 0

i tried this

If(Len(Trim(A)) = 0, B, A)

but still for

If(Len(Trim(A)) = 0, B, A) , i am getting A value where i have value and null where i dont have A value but not B value

sunny_talwar
MVP
MVP

I am not sure I understand what you mean... would you be able to share an example or images?

sunny_talwar
MVP
MVP

Is A and B residing in the same table before you do this?

Anonymous
Not applicable
Author

yes A and B relates to same table