6 Replies Latest reply: Feb 23, 2012 5:15 AM by Sunil Chauhan RSS

    trim text in legend using left function

      Hi guys,

       

      I have a field that is made up of joining 2 other field to create a unique key that a map for cycle time is calcuated on , See below :

       

       

      Field 1Field 2Unique
      GroceriesBreadGroceriesBread
      GroceriesGlovesGroceriesGloves
      ClothingShoesClothingShoes
      GroceriesMilkGroceriesMilk
      ClothingGlovesClothingGloves
      ClothingHatsClothingHats

       

      This is the map so even though field 2 has Gloves in it twice we can determine diff cycle times based on field 1.

       

      UniqueTime to   complete
      GroceriesBread5
      GroceriesGloves10
      ClothingShoes10
      GroceriesMilk5
      ClothingGloves15
      ClothingHats10

       

       

      Anyhow, now we have a chart based on Unique field -- But in the legend it is displayed as the unique title we would like to trim field 1 from this in display of chart

       

      Using Excel we would do the following --- Is there an equivalent in Qlikview

       

      =IF(LEFT([Field1],1)="G",TRIM(MID([Field1],10,20)),IF(LEFT([Field1],1)="C",TRIM(MID([Field1],9,20))))

       

      Thanks


      A