4 Replies Latest reply: Jun 18, 2012 4:50 AM by Jeroen Jordaan RSS

    Create variables with a loop from Excel

    Jeroen Jordaan

      Hi All

       

      We have an Excel with a seperate tab for all the KPI's with the expressions we use in the QV dashboard.
      I'm trying to create a loop so all variables will be automaticly be created.

       

      I'm trying to do something like this:

      KPI:
      LOAD
            KPICode,
            KPI                   AS KPI_Desc,
            Expression       AS KPI_Expression
      FROM
      [..\Nav_Aansturing\Qlikview control file.xlsx]
      (ooxml, embedded labels, table is [KPI's])
      Where not IsNull(KPI);

      LET vKPI = NoOfRows('KPI');

      For i = 1 to $(vKPI)

           LET $(i)_vKPICode = FieldValue('KPI_Expression',$(i));

      NEXT i;

       

      The thing is that I can not make it work that the variable name is created with a variabele name.
      I Have added the Excel file with variabele I want to create.

       

      Thanks for the help