Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
This has to be achived in the straight table expresion
(CASE WHEN ((table1.lastname IS NOT NULL) OR (table1.firstname IS NOT NULL)) THEN ISNULL(table1.lastname ,'') + ', ' +
ISNULL(table1.firstname ,'') ELSE table2.namemodify by END) AS modifiedname,
how to achive this in the qlikiew straight table expression
Try this may be:
= IF( ISNULL(lastname) <> -1 OR ISNULL(firstname) <> -1, lastname & ', ' & firstname, namemodifyby)
-1 why this has been defined in the if loop wht is purpose can explain me
actually in the when condition sql we had given not null and for the condition we given is null, but in the if loop there is only is null
Isnull in QV returns -1 if there are any Nulls.
From Ref Guide help:
Returns -1 (true) if expr returns NULL, otherwise 0 (false).
Quite did not get you what exactly you mean by below:
"actually in the when condition sql we had given not null and for the condition we given is null, but in the if loop there is only is null"
in sql
when is not null(firstname) or is not null(lastname) then take the isnull(firstname) concatenate with isnull(lastname) else take namemodify by
this is meeting in the
qlikview if expression?
Ok try this?
= IF( ISNULL(lastname) <> -1 OR ISNULL(firstname) <> -1,
Alt(lastname, '') & ', ' & Alt(firstname, ''), namemodifyby
)