Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.


value require from two column

Dear All,

i have vendore wise two amount column- 1st is "invoice_amount" and 2nd is currency_conerted_amount

now i wants to generate one new column with this expression -(  i want "currency_conerted_amount "  againsed vendor and if it is null then value should be put from " invoice_ amount)

plz help to generate this new column

5 Replies
Valued Contributor

Re: value require from two column

try like this

Load if(len(trim(currency_conerted_amount))=0,invoice_ amount,currency_conerted_amount ) as newColumn


Re: value require from two column

For questions like this it would be great to know if you are looking for a script solution or a chart object solution.

A simple sample document with a few lines of data will also make it a lot easier for someone to provide a suggestion that fits your purpose.

Re: value require from two column

"currency_conerted_amount" or "currency_converted_amount"?

Try this  (assuming you want this new column created in your load script):


IF (IsNull(currency_conerted_amount), invoice_amount, currency_conerted_amount) AS third_amount,




Alt(currency_conerted_amount, invoice_amount) AS third_amount,


This will handle only NULL values (as per your specification), not zero or blank amounts...




Re: value require from two column

Alt() will handle blank amounts as well as NULL.

ISNULL() will only work with NULL,

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

Re: value require from two column

Sorry, yes you're right, Jonathan. Alt() will handle everything that doesn't look like a number. Even text strings...

Thanks, Peter