Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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.

Tags (3)
2 Replies
Not applicable

Re: Create calculated column of two tables inside script

DataTable:

LOAD

...

Amount,

InvoiceCurrency,

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

'  ' as EurAmount

...

EcbTable:

LOAD

ComboCurrDate,

ECBrate

Not applicable

Re: Create calculated column of two tables inside script

I don't get it

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

Community Browser