2 Replies Latest reply: Sep 27, 2013 7:57 AM by Stanislav Jäger RSS

    QlikView InnerJoin with Intervalmach creates duplicate records, XRate

      Hello,

       

      I'm facing a really strange situation. After using following syntax, only SOME of my records are being duplicated.

      Situation: FactTable and TCURR (currency rates)

       

      FactTable:

      load *, CurrencyLinkCurrencyDate from FactTable.qvd (qvd);

       

      TCURR:

           Type,
          
      CurrencyLink as CurrencyLink,
          
      toCurrency as _Currency,
          
      toCurrency as toCurrency,
          
      Date(fromDate, 'DD/MM/YYYY') as fromDate,
          
      Date(toDate, 'DD/MM/YYYY') as toDate,
          
      XRate
      FROM $(vSource)TCURR_TCURF.qvd (qvd);

       

      inner JOIN (TCURR)
      INTERVALMATCH (CurrencyDate, CurrencyLink, Type)
      LOAD fromDate, toDate, CurrencyLink, Type RESIDENT TCURR;

       

      Result:

      for the most of the records, just one XRate is found, which is correct.

       

      For some of them, additional, same record in the table TCURR will be created and therefore XRate is counted twice so high.

       

      Do you have any idea, why it is so, and how to prevent this behaviour? It could be, of course because of my inner join....

       

      TCURR: Type D, CurrencyLink EUR, toCurrency CHF, fromDate 01.08.2013, toDate 31.12.9999, XRate 0,8

      FactTable: Invoice 1, Sales 100, Currency EUR.

       

      Thank you

      Regards

       

       

       

      Stan