Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone! I need your help. I need to calculated the margin of each operation. The problem is that the operation table with the fields product id, order id, date, sales amount,and quantity is located in a database but the production cost is in another database where I have the fields product id, date and unitary cost.
How can I make the data model to obtain the commercial margin of each operation? I am using the new data manager of qlik sense desktop 2.3
Thank you very much!
Hi Ignacio,
Try this-
U have two tables [Operation] and [Cost] with date as common key. After loading these two tables try below given script- make one more table lets say Table_X
Table_X:
load * resident [Operation];
left join(Table X)
load * resident [Cost];
drop table [Operation];
drop table [Cost];
Now U have Table_X which is having columns of both tables. Now make one more table as-
Table_Y:
load *,
[unitarycost]*[Quantity]
resident Table_X;
drop table Table_X;