6 Replies Latest reply: May 12, 2014 5:27 AM by anbu cheliyan RSS

    Scripting new columns from original table (Lookup)

      Hey Guys,

       

      I have this table:

       

      item_idFood_nameFood_PriceClassificationClassifications
      1hamburguer10unhealthy
      2ice cream11unhealthy
      3steak12unhealthy
      4bread13healthy
      5coke14unhealthy
      6juice1healthy
      7green salad2healthy
      8mango3healthy
      9ham15healthy
      10cesar salad16unhealthy
      11chicken8healthy
      12fish8healthy
      13tofu5healthy
      Ajuice0.5healthycoke
      Bgreen salad1.5healthycesar salad
      Cmango2.5healthyice cream
      Dchicken7healthyhamburguer
      Efish7healthyhamburguer
      Ftofu4healthyhamburguer
      Gfish10healthyhamburguer

       

      I would like Qlikview to generate two new columns (Classifications name the foods that the item_id are replacements for...), so, I would like to show for those foods that are displayed in the Classifications it adds in the line also the item_id for that food and the price, something like a lookup... The final output would be:

       

      item_idFood_nameFood_PriceClassificationClassificationsitem_id1Food_name1
      1hamburguer10unhealthy
      2ice cream11unhealthy
      3steak12unhealthy
      4bread13healthy
      5coke14unhealthy
      6juice1healthy
      7green salad2healthy
      8mango3healthy
      9ham15healthy
      10cesar salad16unhealthy
      11chicken8healthy
      12fish8healthy
      13tofu5healthy
      Ajuice0.5healthycoke514
      Bgreen salad1.5healthycesar salad1016
      Cmango2.5healthyice cream211
      Dchicken7healthyhamburguer110
      Efish7healthyhamburguer110
      Ftofu4healthyhamburguer110
      Gfish10healthyhamburguer110

       

       

      how do I create that???