4 Replies Latest reply: Jun 17, 2016 5:15 AM by Nizam HM RSS

    Replacing ProductID with ProductName in Report

    Ram S

      I have the following Table(Sample Extracted)

       

      TableTransaction

           

      yearCountryCodeProductIDValueTotalValue
      2008ago1025750820562
      2008ago10509094543
      2008ago10308501
      2008ago1073770.08786546
      2008ago1050253400
      2008ago1030141861
      2010btn105011850.6
      2010btn10403953.46
      2010btn10313962390
      2010btn10601604.74
      2010btn108020053.13
      2014ven107017304
      2014ven107167521202
      2014ven1010487042
      2014ven10126486179841
      2014ven1050301279

       

      TableCountry

        

      CountryCodeCountryName
      agoAngola
      btnBhutan
      venVenezuela

       

       

      TableProduct

       

       

        

      ProductIDProductName
      101Cerels
      102Almonds
      103Cashew nuts
      104Corn
      105Palm Oil
      106Olive Oil
      107Dried Fruits
      108Processed Vegetables(Mangoes)

       

       

       

      Now while creating the chart, using TableTransaction, I would like to display 'CountryName' instead of CountryCode, Display ProductName instead of ProductID

       

      how do I do it?

       

      I am using QlikView instead of QlikSense as I am unable to install QlikSense on my computer.

       

      Thank you

        • Re: Replacing ProductID with ProductName in Report
          Phaneendra Kunche

          You have correct table structure. Qlikview will automatically link the fileds that has same names. in this case "CountryCode" from TableTransaction and TableCountry will automatically link and same with your ProductID.

          If you hit CTRL+T you will see the linkage.

           

          So when you create a chart (Straight table) just add the necessary dimensions and a metric you are interested in.

          • Re: Replacing ProductID with ProductName in Report
            Nizam HM

            Load all the table it will link automatically

            Table product is linked to transaction using ProductID

            Table Country is linked to transaction using CountryCode

            Or

            incase u dont want to keep the Product and CountryCode table in your DataModel use ApplyMap


            Product:

            Mapping ProductID,ProductName From ProductTable;


            Country:

            Mapping CountryCode,CountryName From CountryTable;


            Transaction:

            Load 

                 ApplyMap('Product',ProductID) as ProductName,

            ApplyMap('Country',CountryCode) as CountryName,

                   Year,

                   CountryCode,

                   ProductID,

                  Value,

                 TotalValue From Transaction;


            Or U can Use join it will also give the same result single transaction Table


            Transaction:

            Load 

                 Year,

                   CountryCode,

                   ProductID,

                  Value,

                 TotalValue From Transaction;

            Join(Transaction)

            Product:

            ProductID,ProductName From ProductTable;

            Join(Transaction)

            Country:

            CountryCode,CountryName From CountryTable;


            choose according to you what u want

            even u can go for left join because its a master(Product,Country) but in case if u want these master from these master then u have to again extract from the transaction using applymap