Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I cannot get this to work! I've tried a piece at a time and it works, but not together. What am I doing wrong?
=rNickName&' ' &LastName (works giving me the rNickName space LastNamej)
=FirstName&' ' &LastName (works giving me the FirstName space LastName
I am trying to say if the person has an rNickName put rNickName space LastName, if they do not have a rNickName put FirstName space LastName. I can't get it to work. I've tried both of these:
=if(not isNull(rNickName),rNickName&' ' &LastName,FirstName&' ' &LastName)
=if(isNull(rNickName),FirstName&' ' &LastName,rNickName&' ' &LastName,)
Thanks Qlikie Gurus!!!
Can it be that `rNickName` is blank and is not null.
=if(len(trim(rNickName))=0,FirstName,rNickName) &' ' &LastName
If it is null then try this:
=coalesce(rNickName, FirstName) & ' ' & LastName
Something like this can be tricky because an empty string is not null. I find the best solution to be:
Coalesce(EmptyIsNull(rNickName), FirstName) & ' ' & LastName
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Can it be that `rNickName` is blank and is not null.
=if(len(trim(rNickName))=0,FirstName,rNickName) &' ' &LastName
If it is null then try this:
=coalesce(rNickName, FirstName) & ' ' & LastName
@Vegar this is perfect!! =if(len(trim(rNickName))=0,FirstName,rNickName) &' ' &LastName
Thank you so much!!!
I tried the coalesce but couldn't get it to work. Vegar's len trim worked. What is the difference between Null and Blank? Null isn't zero, right?
Null is no value. It is not a number nor a string.
With Blank I was referring to an empty string value: ''
@rwunderlich : I wasn't aware that the EmptyIsNull() function exsists, it looks very handy for cases like this.