Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

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
qlikmsg4u
Specialist
Specialist

try like this

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

ToniKautto
Employee
Employee

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.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

"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,

:


or


:

Alt(currency_conerted_amount, invoice_amount) AS third_amount,

:


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


Best,


Peter

jonathandienst
Partner - Champion III
Partner - Champion III

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
Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

Thanks, Peter