13 Replies Latest reply: Apr 20, 2011 9:38 AM by Antonio Vito De Simone RSS

    want to fill a new table with two fields from a table

    Antonio Vito De Simone

      Good Morning,

      I am new to Qlikview.

      I hope someone will help with the following exercise.

      I load a table from an Excel spreadsheet "Numeri e Lettere.xls" then I want to create a table with two numbers (i.e.: 4 and 5)

       

      NumeriLettere
      1a
      2b
      3c
      4d
      5e
      6f
      7g
      8h
      9i
      10j


       

      This is the script:

       

       

      NumerieLettere:

      Load

      Numeri

       

      ,

      Lettere

      FROM

      [Numeri e Lettere.xls]

      (

      biff, embedded labels, table is [Foglio1$]);

       



       

       

       

       

       

       

       

       

       

       

       

       

       

       

       



       

       

       

       

       

       



       

      tempNumberLetter:

      LOAD

      Numeri

       

      as Numbers,

      Lettere

       

      as Letters

      Resident

      NumerieLettere;

       

      NumberLetterTable:

      LOAD

      Numbers

      Resident

      tempNumberLetter;

       

      for

       

       

      let

       

       

      load

       

       

      '$(varmyNumber)' as myNumberCharacter

      AutoGenerate

       

      (1);

      next

      DROP

       

       

       

      Table tempNumberLetter; varmyNumber = peek('Numbers', $(a), '[NumberLetterTable]');

      [Lista Numeri e Lettere]:

      a=3 to 4

      as you can see only the number 4 is shown:

       

      I will appreciate your help

      Thanks

      Antonio