2 Replies Latest reply: Mar 18, 2013 9:10 AM by Thorsten Schröder RSS

    Create calculated column of two tables inside script

    Thorsten Schröder

      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.