Discussion board where members can get started with QlikView.
I have two tables
I need a field in script that i can use in table box and other objects on sheets as
Profit = Sale price - Purchase price
any help in this would be great..
I am really new to QlickView, so clear and working code will really help alot
You can MAPPING and get Purchase Price to Table 1. You can read about MAPPING in help.You can try the following code.
Table2_Map:MAPPING Load ProductID, [Purchase Price]FROM Table2;
Table1:LOAD *,[Sale Price]-[Purchase Price] as Profit; //This is Preceding LoadLOAD ProductID, [Product Descrition], applymap('Table2_Map',ProductID,0) as [Purchase Price], [Sale Price]FROM Table1;
Now you can use this profit field in the charts. Hope this will help.
ProductID&'-'&[Product Descrition] as Key,
ProductID as ProductID1 ,
[Product Descrition] as [Product Descrition1] ,
reload the app and the take one pivot table
choose dimension and then in expression u write
[Sale Price]-[Purchase Price] or sum([Sale Price])-sum([Purchase Price])
hope this help
You can Use also join function
left join(Table 1)
Sale Price*Purchase Price as Profit
Drop table Table1;
and one more thing if is there any syn key then remove syn key
May it helps you