Monday, May 21, 2012
Register

You are here  >  Forums  >  QlikView  >  Desktop  >  incomprehensible script behaviour





incomprehensible script behaviour
Last Post 13 Jan 2012 12:58 PM by Oliver. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Oliver
New Member
New Member
Send Private Message
Posts:3
Oliver

--
13 Jan 2012 12:46 PM

    On script tab 'FactSales - SCD Type2'
    there is an Intervalmatch, which refers to field DateInvoiced:

     // Temp
     Temp_%KeyCustomer3:  
     Intervalmatch (DateInvoiced)
     NoConcatenate Load
      ValidFrom,
      ValidTill
     Resident Temp_%KeyCustomer2;

    The resultset of this Intervalmatch contains 4 rows.

    **

    Searching backwards in the script the next occurence of
    the field DateInvoiced is here :

     Temp_%KeyCustomer1:
     NoConcatenate Load
      CustomerNumber   as  vCustomerNumber,
      InvoiceNumber   as vInvoiceNumber,
      DateInvoiced
     Resident FactSales_Source
     Where RowId = $(i);

    But: this only has a resultset of a single row !

    **

    Based on that this cannot be the source of the field
    in used in the Intervalmatch.

    To verify this I renamed the field:

     Temp_%KeyCustomer1:
     NoConcatenate Load
      CustomerNumber   as  vCustomerNumber,
      InvoiceNumber   as vInvoiceNumber,
      //DateInvoiced
      DateInvoiced as DateInvoicedOM
     Resident FactSales_Source
     Where RowId = $(i);

    Result does not change !

    **

    Searching further backwards in the script for
    the field name leads to :

     FactSales_Source:
     LOAD
        CustomerNumber,
           InvoiceNumber,
           DateInvoiced,
           DateInvoiced as Invoiced.Date,
           AmountInvoice
      FROM $(vDataInput)\FactSales_Source.qvd (qvd);

    This resultset contains 9 rows with 4 distinct DateInvoiced - values.

    Question: why does Qlikview not refer to the next occurence of
    the field backwards ?

    Oliver
    New Member
    New Member
    Send Private Message
    Posts:3
    Oliver

    --
    13 Jan 2012 12:58 PM

    I forgot the most important thing .

    The question relates to the script used in this article:

     

    http://www.qlikconnect.com/articles...id/54.aspx

     

     

    You are not authorized to post a reply.