Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create calculated column of two tables inside script

Hello community,

This question is related to my previous post:

http://community.qlik.com/message/322989#322989

I have two tables with the following (simplified) structure:

DataTable:

LOAD

...

Amount,

InvoiceCurrency,

if(NOT Wildmatch(InvoiceCurrency,'EUR'), InvoiceCurrency&'-'&CutoffDate,'EUR')  AS ComboCurrDate

...

EcbTable:

LOAD

ComboCurrDate,

ECBrate

So the tables are linked through the ComboCurrDate column.

I want to add a column for EurAmount so that I can use this field in set analysis and other scenarios.

Right now I use this statement to calculate the EurAmount outside my script:

if(NOT Wildmatch(InvoiceCurrency,'EUR'), (Amount / (1 * ECBrate)),Amount)

What do I need to do to create this calculated column? Create a third table, use a join - do I need a real key field?

I hope you can help me out here.

thank you.

2 Replies
Not applicable
Author

DataTable:

LOAD

...

Amount,

InvoiceCurrency,

if(NOT Wildmatch(InvoiceCurrency,'EUR'), InvoiceCurrency&'-'&CutoffDate,'EUR')  AS ComboCurrDate,

'  ' as EurAmount

...

EcbTable:

LOAD

ComboCurrDate,

ECBrate

Not applicable
Author

I don't get it

This way I still have to use the if statement in every expression, don't I?