Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following Table(Sample Extracted)
TableTransaction
year | CountryCode | ProductID | Value | TotalValue |
---|---|---|---|---|
2008 | ago | 102 | 5750 | 820562 |
2008 | ago | 105 | 0 | 9094543 |
2008 | ago | 103 | 0 | 8501 |
2008 | ago | 107 | 3770.08 | 786546 |
2008 | ago | 105 | 0 | 253400 |
2008 | ago | 103 | 0 | 141861 |
2010 | btn | 105 | 0 | 11850.6 |
2010 | btn | 104 | 0 | 3953.46 |
2010 | btn | 103 | 1396239 | 0 |
2010 | btn | 106 | 0 | 1604.74 |
2010 | btn | 108 | 0 | 20053.13 |
2014 | ven | 107 | 0 | 17304 |
2014 | ven | 107 | 1675 | 21202 |
2014 | ven | 101 | 0 | 487042 |
2014 | ven | 101 | 26486 | 179841 |
2014 | ven | 105 | 0 | 301279 |
TableCountry
CountryCode | CountryName |
---|---|
ago | Angola |
btn | Bhutan |
ven | Venezuela |
TableProduct
ProductID | ProductName |
---|---|
101 | Cerels |
102 | Almonds |
103 | Cashew nuts |
104 | Corn |
105 | Palm Oil |
106 | Olive Oil |
107 | Dried Fruits |
108 | Processed 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
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.
Thanks Phaneendra Kunche
Qlikview automatically links the Table when I hit CTRL+T. The Links as follows
http://i.imgur.com/BTK4dIj.png
Here is my code when I select CTRL +E
http://i.imgur.com/SAcd7dm.png
My Screen chart looks like below
http://i.imgur.com/Kc2aEt6.png
Given my structure of Table, I would like to replace the 3 digit country code with Actual country name. Example on the chart instead of 'ago' I should get 'Angola'
My Data size is very long. One of the table is nearly 500MB Text file. I have extracted small portion to show here. Thanks
How do I implement?
Thanks
Are you simply wanting to change the charts column from CountryCode to CountryName?
Or did you want to modify your data model structure?
Using a Mapping Load and ApplyMap sounds like your option.
Load your COUNTRY and PRODUCTS tables as Mapping Load then ApplyMap in your script:
MapProduct:
Mapping
Load
ProductID,
ProductName
From YourTable;
Transactions:
Load
Fields,
ApplyMap('MapProduct', ProductID) as ProductName
From YourOtherTable;
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